changeset 15418:16cd6fd20e6f

Prevent tree from crashing when NULL text is added in some column.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 26 Jan 2007 03:39:39 +0000
parents 805c7d4dea26
children b25a5eddff9c
files console/libgnt/gnttree.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/console/libgnt/gnttree.c	Fri Jan 26 03:00:46 2007 +0000
+++ b/console/libgnt/gnttree.c	Fri Jan 26 03:39:39 2007 +0000
@@ -1382,7 +1382,7 @@
 	{
 		GntTreeCol *col = g_new0(GntTreeCol, 1);
 		col->span = 1;
-		col->text = g_strdup(iter->data);
+		col->text = g_strdup(iter->data ? iter->data : "");
 
 		row->columns = g_list_append(row->columns, col);
 	}