From: John Darrington Date: Wed, 31 Dec 2008 04:20:15 +0000 (+0900) Subject: Fixed bug finalizing window X-Git-Tag: v0.7.3~296^2~18 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7d0520e3af8636aa9be6e7c75dcf9ff17cbf52f;p=pspp-builds.git Fixed bug finalizing window --- diff --git a/src/ui/gui/psppire-window.c b/src/ui/gui/psppire-window.c index 8405dba7..767e1054 100644 --- a/src/ui/gui/psppire-window.c +++ b/src/ui/gui/psppire-window.c @@ -35,7 +35,7 @@ static void psppire_window_init (PsppireWindow *window); static PsppireWindowClass *the_class; - +static GObjectClass *parent_class; GType psppire_window_get_type (void) @@ -181,20 +181,11 @@ psppire_window_finalize (GObject *object) PsppireWindow *window = PSPPIRE_WINDOW (object); PsppireWindowClass *class = PSPPIRE_WINDOW_CLASS (G_OBJECT_GET_CLASS (object)); - GtkWindowClass *parent_class = g_type_class_peek_parent (class); - - if ( window->finalized ) - return; - - window->finalized = TRUE; - - g_debug ("%s %p", __FUNCTION__, object); - g_hash_table_remove (class->name_table, window->name); free (window->name); if (G_OBJECT_CLASS (parent_class)->finalize) - (*G_OBJECT_CLASS (parent_class)->finalize) (object); + G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -203,6 +194,8 @@ psppire_window_class_init (PsppireWindowClass *class) { GObjectClass *object_class = G_OBJECT_CLASS (class); + + GParamSpec *use_class_spec = g_param_spec_enum ("usage", "Usage", @@ -238,6 +231,7 @@ psppire_window_class_init (PsppireWindowClass *class) g_hash_table_insert (class->name_table, "Untitled", NULL); the_class = class; + parent_class = g_type_class_peek_parent (class); }