diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2003-05-18 08:48:03 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2003-05-18 08:48:03 +0800 |
commit | 63c34c461549a1b07aafd191ba9d5f129a896527 (patch) | |
tree | a1350e14a929ce3ba41aa8044e13129b0e8dea17 | |
parent | 8967981e41e058ccffc099afe372ac0bd4238992 (diff) | |
download | gsoc2013-evolution-63c34c461549a1b07aafd191ba9d5f129a896527.tar gsoc2013-evolution-63c34c461549a1b07aafd191ba9d5f129a896527.tar.gz gsoc2013-evolution-63c34c461549a1b07aafd191ba9d5f129a896527.tar.bz2 gsoc2013-evolution-63c34c461549a1b07aafd191ba9d5f129a896527.tar.lz gsoc2013-evolution-63c34c461549a1b07aafd191ba9d5f129a896527.tar.xz gsoc2013-evolution-63c34c461549a1b07aafd191ba9d5f129a896527.tar.zst gsoc2013-evolution-63c34c461549a1b07aafd191ba9d5f129a896527.zip |
(e_storage_set_view_set_show_checkboxes):
Reallocate the "expansions" member of ETreeState as well, to avoid
a memory error. [#43119]
svn path=/trunk/; revision=21232
-rw-r--r-- | shell/ChangeLog | 6 | ||||
-rw-r--r-- | shell/e-storage-set-view.c | 9 |
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; |