From: John Darrington Date: Tue, 10 Jul 2012 16:41:31 +0000 (+0200) Subject: PsppireDataEditor: No longer keep a reference to the data window. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=106d75b11af013f3c6a9e4f86f2db927e9afb34e;p=pspp PsppireDataEditor: No longer keep a reference to the data window. --- diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index aae43698ac..02ef97a907 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -89,7 +89,6 @@ psppire_data_editor_dispose (GObject *obj) if (de->dispose_has_run) return; - g_object_unref (de->data_window); g_object_unref (de->data_store); g_object_unref (de->var_store); @@ -385,10 +384,9 @@ psppire_data_editor_set_property (GObject *object, psppire_data_editor_split_window (de, g_value_get_boolean (value)); break; case PROP_DATA_WINDOW: - if (de->data_window) - g_object_unref (de->data_window); + /* We hold no reference to this object, since it is used only by do_sort, + and that cannot be called unless the window is realized. */ de->data_window = g_value_get_pointer (value); - g_object_ref (de->data_window); break; case PROP_DATA_STORE: if ( de->data_store) g_object_unref (de->data_store);