From 567dd27e9b3e9098927923bf8c0c4c3a71307660 Mon Sep 17 00:00:00 2001 From: Jakub Filak Date: Wed, 30 Jul 2014 13:44:02 +0200 Subject: [LIBREPORT PATCH 49/93] gui: clear the sensitive cache between two event runs Was causing a SIGSEGV. Related to rhbz#1069917 Signed-off-by: Jakub Filak --- src/gui-wizard-gtk/wizard.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c index 7cdd88b..3dcc756 100644 --- a/src/gui-wizard-gtk/wizard.c +++ b/src/gui-wizard-gtk/wizard.c @@ -1166,6 +1166,31 @@ static void remove_tabs_from_notebook(GtkNotebook *notebook) */ gtk_notebook_remove_page(notebook, 0); //we need to always the page 0 } + + /* Turn off the changed callback during the update */ + g_signal_handler_block(g_tv_sensitive_sel, g_tv_sensitive_sel_hndlr); + + g_current_highlighted_word = NULL; + + GtkTreeIter iter; + gboolean valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(g_ls_sensitive_list), &iter); + while (valid) + { + char *text = NULL; + search_item_t *word = NULL; + + gtk_tree_model_get(GTK_TREE_MODEL(g_ls_sensitive_list), &iter, + SEARCH_COLUMN_TEXT, &text, + SEARCH_COLUMN_ITEM, &word, + -1); + + free(text); + free(word); + + valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(g_ls_sensitive_list), &iter); + } + gtk_list_store_clear(g_ls_sensitive_list); + g_signal_handler_unblock(g_tv_sensitive_sel, g_tv_sensitive_sel_hndlr); } static void append_item_to_ls_details(gpointer name, gpointer value, gpointer data) -- 1.8.3.1