[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] psppire-data-editor: Unref old data_window upon change.
From: |
Ben Pfaff |
Subject: |
[PATCH] psppire-data-editor: Unref old data_window upon change. |
Date: |
Sun, 8 Jul 2012 23:28:37 -0700 |
Otherwise there's a reference leak.
Found by inspection; I haven't looked for clients that actually
change the data window after setting it.
---
Here's another obvious fix that I've already pushed.
src/ui/gui/psppire-data-editor.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c
index 16b1393..aae4369 100644
--- a/src/ui/gui/psppire-data-editor.c
+++ b/src/ui/gui/psppire-data-editor.c
@@ -385,6 +385,8 @@ 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);
de->data_window = g_value_get_pointer (value);
g_object_ref (de->data_window);
break;
--
1.7.2.5
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] psppire-data-editor: Unref old data_window upon change.,
Ben Pfaff <=