aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-table.c1
-rw-r--r--widgets/table/gal-a11y-e-table-item.c19
2 files changed, 17 insertions, 3 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 50751c8889..aab26439af 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -1754,7 +1754,6 @@ et_real_construct (ETable *e_table,
e_table->draw_focus = specification->draw_focus;
e_table->cursor_mode = specification->cursor_mode;
e_table->full_header = e_table_spec_to_full_header (specification, ete);
- g_object_ref (e_table->full_header);
col_count = e_table_header_count (e_table->full_header);
for (i = 0; i < col_count; i++) {
diff --git a/widgets/table/gal-a11y-e-table-item.c b/widgets/table/gal-a11y-e-table-item.c
index 2c6de549b9..ea9c12b1d7 100644
--- a/widgets/table/gal-a11y-e-table-item.c
+++ b/widgets/table/gal-a11y-e-table-item.c
@@ -72,6 +72,21 @@ static gboolean gal_a11y_e_table_item_unref_selection (GalA11yETableItem *a11y);
static AtkObject * eti_ref_at (AtkTable *table, gint row, gint column);
static void
+free_columns (ETableCol **columns)
+{
+ gint ii;
+
+ if (!columns)
+ return;
+
+ for (ii = 0; columns[ii]; ii++) {
+ g_object_unref (columns[ii]);
+ }
+
+ g_free (columns);
+}
+
+static void
item_finalized (gpointer user_data,
GObject *gone_item)
{
@@ -219,7 +234,7 @@ eti_dispose (GObject *object)
GalA11yETableItemPrivate *priv = GET_PRIVATE (a11y);
if (priv->columns) {
- g_free (priv->columns);
+ free_columns (priv->columns);
priv->columns = NULL;
}
@@ -934,7 +949,7 @@ eti_header_structure_changed (ETableHeader *eth,
g_free (reorder);
g_free (prev_state);
- g_free (priv->columns);
+ free_columns (priv->columns);
priv->columns = cols;
}