From 6820cc2b3efee2347a3cfc3861cb293b485e2859 Mon Sep 17 00:00:00 2001 From: "Ira W. Snyder" Date: Tue, 22 Jan 2008 22:30:24 -0800 Subject: [PATCH] [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. --- tilda-window.c | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- 2.34.1