summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2018-01-19 12:49:13 -0500
committerlukefromdc <[email protected]>2018-01-19 12:49:13 -0500
commit3889e1727159429123f872d4f3a2cf8c7ddbb971 (patch)
tree2464b283bb80628cd1e853d09d2ba0e0a41f2267
parentdd14fcb2857f1376b5bf8f55d62324f7aaa4606f (diff)
downloadmate-panel-3889e1727159429123f872d4f3a2cf8c7ddbb971.tar.bz2
mate-panel-3889e1727159429123f872d4f3a2cf8c7ddbb971.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.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mate-panel/panel-run-dialog.c b/mate-panel/panel-run-dialog.c
index e8962494..e00d0c51 100644
--- a/mate-panel/panel-run-dialog.c
+++ b/mate-panel/panel-run-dialog.c
@@ -1450,10 +1450,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;