summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-10-11 22:39:29 +0200
committerStefano Karapetsas <[email protected]>2013-10-11 22:40:27 +0200
commitfda33fbeedc0aab64d9479850047d0817d0b38be (patch)
tree181b20bdaf4a11b2e37efcaaa6b893aa08410d70
parent7c344728b1186266be690616ffb7e9c65df495af (diff)
downloadatril-fda33fbeedc0aab64d9479850047d0817d0b38be.tar.bz2
atril-fda33fbeedc0aab64d9479850047d0817d0b38be.tar.xz
Check if handler_id is connected before disconnect
Closes #40 https://github.com/mate-desktop/mate-document-viewer/issues/40
-rw-r--r--libmisc/ev-page-action-widget.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libmisc/ev-page-action-widget.c b/libmisc/ev-page-action-widget.c
index e0cd9c62..62fe01fd 100644
--- a/libmisc/ev-page-action-widget.c
+++ b/libmisc/ev-page-action-widget.c
@@ -243,8 +243,10 @@ ev_page_action_widget_finalize (GObject *object)
if (action_widget->doc_model != NULL) {
if (action_widget->signal_id > 0) {
- g_signal_handler_disconnect (action_widget->doc_model,
- action_widget->signal_id);
+ if (g_signal_handler_is_connected(action_widget->doc_model,
+ action_widget->signal_id))
+ g_signal_handler_disconnect (action_widget->doc_model,
+ action_widget->signal_id);
action_widget->signal_id = 0;
}
g_object_remove_weak_pointer (G_OBJECT (action_widget->doc_model),