diff options
author | lukefromdc <[email protected]> | 2018-01-19 12:49:13 -0500 |
---|---|---|
committer | monsta <[email protected]> | 2018-03-18 14:46:22 +0300 |
commit | 683056ef8a8571fc9c3da8e8443b7bba54a4de3d (patch) | |
tree | 6bce6d5ea956058495bad667541b15499847e614 | |
parent | 748394c3abf4228249a9181741b7d6a1f581d81b (diff) | |
download | mate-panel-683056ef8a8571fc9c3da8e8443b7bba54a4de3d.tar.bz2 mate-panel-683056ef8a8571fc9c3da8e8443b7bba54a4de3d.tar.xz |
panel-run-dialog: fix segfault when program list is enabled
Fix https://github.com/mate-desktop/mate-panel/issues/706
*patch by https://github.com/muesli4
-rw-r--r-- | mate-panel/panel-run-dialog.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mate-panel/panel-run-dialog.c b/mate-panel/panel-run-dialog.c index 500fcb62..6e45a272 100644 --- a/mate-panel/panel-run-dialog.c +++ b/mate-panel/panel-run-dialog.c @@ -1447,10 +1447,14 @@ entry_event (GtkEditable *entry, if (event->type != GDK_KEY_PRESS) return FALSE; - /* if user typed something we're not using the list anymore */ + /* if user typed something we're not using the list anymore + (but only if it is enabled anyway) + */ dialog->use_program_list = FALSE; - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->program_list)); - gtk_tree_selection_unselect_all (selection); + if (panel_profile_get_enable_program_list ()) { + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->program_list)); + gtk_tree_selection_unselect_all (selection); + } if (!panel_profile_get_enable_autocompletion ()) return FALSE; |