gtk textview问题……

NoneSec 2010-08-02 09:11:30
int print_to_text_view(char *msg,int type)
{
while (gtk_events_pending())gtk_main_iteration();
buffer=gtk_text_view_get_buffer(GTK_TEXT_VIEW(tcptext));
gtk_text_buffer_get_end_iter(buffer,&end);
gtk_text_buffer_insert(buffer,&end,g_locale_to_utf8(msg,-1,NULL,NULL,NULL), -1);
gtk_text_view_set_buffer(GTK_TEXT_VIEW(tcptext),buffer);

return 1;
}
上面这个往textview中插入数据的函数在运行时会出现
(raw:2871): Gtk-CRITICAL **: gtk_text_buffer_insert: assertion `text != NULL' failed
这是为什么阿?
...全文
152 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

23,120

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧