aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/e-storage-set-view.c9
2 files changed, 13 insertions, 2 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 3025670980..0c7fbc87c6 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,9 @@
+2003-05-17 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-storage-set-view.c (e_storage_set_view_set_show_checkboxes):
+ Reallocate the "expansions" member of ETreeState as well, to avoid
+ a memory error. [#43119]
+
2003-05-15 Ettore Perazzoli <ettore@ximian.com>
* e-shell.c (parse_default_uri): Protect against the component
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 735da0ab21..5ec5a9d46b 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -2316,12 +2316,17 @@ e_storage_set_view_set_show_checkboxes (EStorageSetView *storage_set_view,
priv->show_checkboxes = show;
state = e_tree_get_state_object (E_TREE (storage_set_view));
- g_free (state->columns);
state->col_count = show ? 2 : 1;
- state->columns = g_new(int, state->col_count);
+ state->columns = g_renew (int, state->columns, state->col_count);
state->columns [state->col_count - 1] = 0;
if (show)
state->columns [0] = 1;
+
+ state->expansions = g_renew (double, state->expansions, state->col_count);
+ state->expansions [0] = 1.0;
+ if (show)
+ state->expansions [1] = 1.0;
+
e_tree_set_state_object (E_TREE (storage_set_view), state);
priv->has_checkbox_func = has_checkbox_func;