projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8fb367
)
psppire-data-editor: Unref old data_window upon change.
20120709000503/pspp
author
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 9 Jul 2012 06:27:52 +0000
(23:27 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 9 Jul 2012 06:27:52 +0000
(23:27 -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.
src/ui/gui/psppire-data-editor.c
patch
|
blob
|
history
diff --git
a/src/ui/gui/psppire-data-editor.c
b/src/ui/gui/psppire-data-editor.c
index 16b1393df3977593f2e94c226ead0fedd478c6e5..aae43698ac75bdfd5c96213e9937aeb1167bb64d 100644
(file)
--- 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;