From 4ad3b2c40a1e5b04dba499226ba18fbb5522aec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nelson=20Ben=C3=ADtez=20Le=C3=B3n?= Date: Fri, 23 Feb 2024 12:51:30 +0000 Subject: [PATCH] sidebar-annotations: avoid crash when deleting annotation avoid it by preventing running our GtkTreeSelection 'changed' handler when triggered by gtk_tree_store_clear() in the callback for loading the new annotations. Fixes #2022 --- shell/ev-sidebar-annotations.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/ev-sidebar-annotations.c b/shell/ev-sidebar-annotations.c index cd0839cc..05133a73 100644 --- a/shell/ev-sidebar-annotations.c +++ b/shell/ev-sidebar-annotations.c @@ -356,7 +356,9 @@ job_finished_callback (EvJobAnnots *job, G_CALLBACK (sidebar_tree_button_press_cb), sidebar_annots); + g_signal_handler_block (selection, priv->selection_changed_id); gtk_tree_store_clear (model); + g_signal_handler_unblock (selection, priv->selection_changed_id); for (l = job->annots; l; l = g_list_next (l)) { EvMappingList *mapping_list;