From 683056ef8a8571fc9c3da8e8443b7bba54a4de3d Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Fri, 19 Jan 2018 12:49:13 -0500 Subject: 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 --- mate-panel/panel-run-dialog.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'mate-panel') 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; -- cgit v1.2.1