From 0e338ba3e0fa03b28664448af0cea686c5e6c26d Mon Sep 17 00:00:00 2001 From: Mike Newman Date: Fri, 17 Jan 2003 07:46:11 +0000 Subject: Fix a segfault in the --list if no data is supplied to populate the tree. --- src/tree.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/tree.c') diff --git a/src/tree.c b/src/tree.c index 29b38c66..c19b1804 100644 --- a/src/tree.c +++ b/src/tree.c @@ -124,7 +124,13 @@ zenity_tree (ZenityData *data, ZenityTreeData *tree_data) data->exit_code = -1; return; } - + + if (tree_data->data == NULL) { + g_printerr (_("No contents specified for --list\n")); + data->exit_code = -1; + return; + } + glade_xml_signal_autoconnect (glade_dialog); dialog = glade_xml_get_widget (glade_dialog, "zenity_tree_dialog"); -- cgit