Skip to content

Commit

Permalink
actions: Cancel action update idle callbacks during dispose for
Browse files Browse the repository at this point in the history
non-NemoView types.
  • Loading branch information
mtwebster committed Oct 22, 2024
1 parent 7eb062a commit bc192b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/nemo-blank-desktop-window.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/nemo-places-sidebar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/nemo-tree-sidebar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bc192b6

Please sign in to comment.