Debug is not necessary anymore, and don't crash on null text.

Fri, 20 Apr 2007 19:14:04 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Fri, 20 Apr 2007 19:14:04 +0000
changeset 16362
a4af57dc76fd
parent 16361
9606d491323a
child 16363
d7ee19070678
child 16366
162a64468b86

Debug is not necessary anymore, and don't crash on null text.

finch/libgnt/gntbindable.h file | annotate | diff | comparison | revisions
finch/libgnt/gntclipboard.h file | annotate | diff | comparison | revisions
finch/libgnt/gnttree.c file | annotate | diff | comparison | revisions
--- a/finch/libgnt/gntbindable.h	Fri Apr 20 11:53:43 2007 +0000
+++ b/finch/libgnt/gntbindable.h	Fri Apr 20 19:14:04 2007 +0000
@@ -13,7 +13,7 @@
 #define GNT_IS_BINDABLE_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_BINDABLE))
 #define GNT_BINDABLE_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_BINDABLE, GntBindableClass))
 
-#define	GNTDEBUG	g_printerr("%s\n", __FUNCTION__)
+#define	GNTDEBUG
 
 typedef struct _GntBindable			GntBindable;
 typedef struct _GntBindableClass		GntBindableClass;
--- a/finch/libgnt/gntclipboard.h	Fri Apr 20 11:53:43 2007 +0000
+++ b/finch/libgnt/gntclipboard.h	Fri Apr 20 19:14:04 2007 +0000
@@ -12,8 +12,6 @@
 #define GNT_IS_CLIPBOARD_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_CLIPBOARD))
 #define GNT_CLIPBOARD_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_CLIPBOARD, GntClipboardClass))
 
-#define	GNTDEBUG	g_printerr("%s\n", __FUNCTION__)
-
 typedef struct _GntClipboard			GntClipboard;
 typedef struct _GntClipboardClass		GntClipboardClass;
 
--- a/finch/libgnt/gnttree.c	Fri Apr 20 11:53:43 2007 +0000
+++ b/finch/libgnt/gnttree.c	Fri Apr 20 19:14:04 2007 +0000
@@ -1344,7 +1344,7 @@
 	{
 		col = g_list_nth_data(row->columns, colno);
 		g_free(col->text);
-		col->text = g_strdup(text);
+		col->text = g_strdup(text ? text : "");
 
 		if (get_distance(tree->top, row) >= 0 && get_distance(row, tree->bottom) >= 0)
 			redraw_tree(tree);

mercurial