Fix a segfault in the --list if no data is supplied to populate
the tree.
This commit is contained in:
parent
4115d4e1f5
commit
0e338ba3e0
@ -1,3 +1,9 @@
|
||||
2003-01-16 Mike Newman <mike@gtnorthern.demon.co.uk>
|
||||
|
||||
* src/tree.c: fix a segfault if a --list is constructed and there
|
||||
is no data to put in it. Since a list with no contents to select
|
||||
seemed pointless, return without showing dialog.
|
||||
|
||||
2003-01-15 Glynn Foster <glynn.foster@sun.com>
|
||||
|
||||
* help/C/Makefile.am, help/C/legal.xml, help/C/zenity-C.omf,
|
||||
|
@ -125,6 +125,12 @@ zenity_tree (ZenityData *data, ZenityTreeData *tree_data)
|
||||
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");
|
||||
|
Reference in New Issue
Block a user