From 106d75b11af013f3c6a9e4f86f2db927e9afb34e Mon Sep 17 00:00:00 2001 From: John Darrington Date: Tue, 10 Jul 2012 18:41:31 +0200 Subject: [PATCH] PsppireDataEditor: No longer keep a reference to the data window. --- src/ui/gui/psppire-data-editor.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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); -- 2.30.2