aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2014-04-28 21:51:37 +0800
committerMilan Crha <mcrha@redhat.com>2014-04-28 21:51:37 +0800
commit43a4b38f4a543d1459caf3ddf1eacffad05dd5e6 (patch)
tree06feb8aad14aac04a1cd5986277797e2d62ca5e1 /e-util
parent9922d3a01df4f73b48612eac060f0bfd27835e5d (diff)
downloadgsoc2013-evolution-43a4b38f4a543d1459caf3ddf1eacffad05dd5e6.tar
gsoc2013-evolution-43a4b38f4a543d1459caf3ddf1eacffad05dd5e6.tar.gz
gsoc2013-evolution-43a4b38f4a543d1459caf3ddf1eacffad05dd5e6.tar.bz2
gsoc2013-evolution-43a4b38f4a543d1459caf3ddf1eacffad05dd5e6.tar.lz
gsoc2013-evolution-43a4b38f4a543d1459caf3ddf1eacffad05dd5e6.tar.xz
gsoc2013-evolution-43a4b38f4a543d1459caf3ddf1eacffad05dd5e6.tar.zst
gsoc2013-evolution-43a4b38f4a543d1459caf3ddf1eacffad05dd5e6.zip
Fix regressions after commit fdde3339619
The commit fixed few memory leaks, but also caused several crashes due to those changes, thus this fixes the introduces issues.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-table-one.c2
-rw-r--r--e-util/gal-a11y-e-table-item.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/e-util/e-table-one.c b/e-util/e-table-one.c
index 5d8f104967..96082df4ea 100644
--- a/e-util/e-table-one.c
+++ b/e-util/e-table-one.c
@@ -144,6 +144,8 @@ table_one_free_value (ETableModel *etm,
if (one->source)
e_table_model_free_value (one->source, col, value);
+ if (one->data)
+ one->data[col] = one->source ? e_table_model_initialize_value (one->source, col) : NULL;
}
static gpointer
diff --git a/e-util/gal-a11y-e-table-item.c b/e-util/gal-a11y-e-table-item.c
index e3a842a977..95b489411d 100644
--- a/e-util/gal-a11y-e-table-item.c
+++ b/e-util/gal-a11y-e-table-item.c
@@ -875,9 +875,9 @@ eti_header_structure_changed (ETableHeader *eth,
g_return_if_fail (cols && prev_cols && n_cols > 0);
/* Init to ETI_HEADER_UNCHANGED. */
- state = g_malloc0 (sizeof (gint) * n_cols);
- prev_state = g_malloc0 (sizeof (gint) * prev_n_cols);
- reorder = g_malloc0 (sizeof (gint) * n_cols);
+ state = g_malloc0 (sizeof (gint) * (MAX (prev_n_cols, n_cols) + 1));
+ prev_state = g_malloc0 (sizeof (gint) * (MAX (prev_n_cols, n_cols) + 1));
+ reorder = g_malloc0 (sizeof (gint) * (MAX (prev_n_cols, n_cols) + 1));
/* Compare with previously saved column headers. */
for (i = 0; i < n_cols && cols[i]; i++) {