Skip to content

Commit a9f22e7

Browse files
committed
Check if handler_id is connected before disconnect
Closes mate-desktop#40 mate-desktop#40
1 parent 0b09a2e commit a9f22e7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libmisc/ev-page-action-widget.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,10 @@ ev_page_action_widget_finalize (GObject *object)
243243

244244
if (action_widget->doc_model != NULL) {
245245
if (action_widget->signal_id > 0) {
246-
g_signal_handler_disconnect (action_widget->doc_model,
247-
action_widget->signal_id);
246+
if (g_signal_handler_is_connected(action_widget->doc_model,
247+
action_widget->signal_id))
248+
g_signal_handler_disconnect (action_widget->doc_model,
249+
action_widget->signal_id);
248250
action_widget->signal_id = 0;
249251
}
250252
g_object_remove_weak_pointer (G_OBJECT (action_widget->doc_model),

0 commit comments

Comments
 (0)