diff options
author | Stefano Karapetsas <[email protected]> | 2013-10-11 22:39:29 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-10-11 22:39:29 +0200 |
commit | a9f22e7728dd730cf7ca82dd1c7421194262ccfb (patch) | |
tree | bfbd29e567e921d27315b10047418d6b31bd2a3c | |
parent | 0b09a2e549f95217402f25318ea1cd25b3d91f8d (diff) | |
download | atril-a9f22e7728dd730cf7ca82dd1c7421194262ccfb.tar.bz2 atril-a9f22e7728dd730cf7ca82dd1c7421194262ccfb.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.c | 6 |
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), |