From bc192b69236d67ca5bb412034627dafe4322a93b Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Tue, 22 Oct 2024 13:13:09 -0400 Subject: [PATCH] actions: Cancel action update idle callbacks during dispose for non-NemoView types. --- src/nemo-blank-desktop-window.c | 2 ++ src/nemo-places-sidebar.c | 2 ++ src/nemo-tree-sidebar.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/nemo-blank-desktop-window.c b/src/nemo-blank-desktop-window.c index 387671a92..f96750ac4 100644 --- a/src/nemo-blank-desktop-window.c +++ b/src/nemo-blank-desktop-window.c @@ -237,6 +237,8 @@ nemo_blank_desktop_window_dispose (GObject *obj) { NemoBlankDesktopWindow *window = NEMO_BLANK_DESKTOP_WINDOW (obj); + g_clear_handle_id (&window->details->actions_changed_idle_id, g_source_remove); + if (window->details->actions_changed_id > 0) { g_signal_handler_disconnect (nemo_desktop_manager_get_action_manager (), window->details->actions_changed_id); diff --git a/src/nemo-places-sidebar.c b/src/nemo-places-sidebar.c index a798e30e0..a131464b1 100644 --- a/src/nemo-places-sidebar.c +++ b/src/nemo-places-sidebar.c @@ -4398,6 +4398,8 @@ nemo_places_sidebar_dispose (GObject *object) free_drag_data (sidebar); + g_clear_handle_id (&sidebar->actions_changed_idle_id, g_source_remove); + if (sidebar->bookmarks_changed_id != 0) { g_signal_handler_disconnect (sidebar->bookmarks, sidebar->bookmarks_changed_id); diff --git a/src/nemo-tree-sidebar.c b/src/nemo-tree-sidebar.c index 5330ec617..d9ec0eb60 100644 --- a/src/nemo-tree-sidebar.c +++ b/src/nemo-tree-sidebar.c @@ -1754,6 +1754,8 @@ fm_tree_view_dispose (GObject *object) view = FM_TREE_VIEW (object); + g_clear_handle_id (&view->details->actions_changed_idle_id, g_source_remove); + if (view->details->selection_changed_timer) { g_source_remove (view->details->selection_changed_timer); view->details->selection_changed_timer = 0;