From: Ira W. Snyder Date: Wed, 23 Jan 2008 06:30:24 +0000 (-0800) Subject: [Window] Unbind global keybinding during dispose X-Git-Url: https://www.irasnyder.com/gitweb/?p=tilda-gobject.git;a=commitdiff_plain;h=6820cc2b3efee2347a3cfc3861cb293b485e2859 [Window] Unbind global keybinding during dispose Previously, the global keybinding was not released during TildaWindow's dispose phase. This made it possible to enter the callback without a valid TildaWindow. Eek. --- diff --git a/tilda-window.c b/tilda-window.c index 87849d8..afb32c5 100644 --- a/tilda-window.c +++ b/tilda-window.c @@ -677,6 +677,10 @@ tilda_window_dispose (GObject *obj) g_ptr_array_foreach (self->terms, my_unref, NULL); gtk_widget_destroy (self->window); + /* Unbind if we were set */ + if (self->key) + tomboy_keybinder_unbind (self->key, tilda_window_keybinding_cb); + /* Chain up to the parent class */ G_OBJECT_CLASS (parent_class)->dispose (obj); }