aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-09-26 18:30:06 +0800
committerMilan Crha <mcrha@redhat.com>2011-09-26 18:30:06 +0800
commit23f5359c41e50c189425ab043162e0b6e0ccda80 (patch)
treeef3fa83a7e5ab19ce2ad690946a79b571d2da758 /widgets
parenta6de7fa6b8253eb4149c57f2807786dc46a6d8a7 (diff)
downloadgsoc2013-evolution-23f5359c41e50c189425ab043162e0b6e0ccda80.tar
gsoc2013-evolution-23f5359c41e50c189425ab043162e0b6e0ccda80.tar.gz
gsoc2013-evolution-23f5359c41e50c189425ab043162e0b6e0ccda80.tar.bz2
gsoc2013-evolution-23f5359c41e50c189425ab043162e0b6e0ccda80.tar.lz
gsoc2013-evolution-23f5359c41e50c189425ab043162e0b6e0ccda80.tar.xz
gsoc2013-evolution-23f5359c41e50c189425ab043162e0b6e0ccda80.tar.zst
gsoc2013-evolution-23f5359c41e50c189425ab043162e0b6e0ccda80.zip
Bug #655625 - Crash in atk_state_set_contains_state
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/gal-a11y-e-table-click-to-add-factory.h2
-rw-r--r--widgets/table/gal-a11y-e-table-item.c17
2 files changed, 12 insertions, 7 deletions
diff --git a/widgets/table/gal-a11y-e-table-click-to-add-factory.h b/widgets/table/gal-a11y-e-table-click-to-add-factory.h
index c8f9782a7e..c7b2cf8e6a 100644
--- a/widgets/table/gal-a11y-e-table-click-to-add-factory.h
+++ b/widgets/table/gal-a11y-e-table-click-to-add-factory.h
@@ -25,7 +25,7 @@
#include <atk/atkobjectfactory.h>
-#define GAL_A11Y_TYPE_E_TABLE_CLICK_TO_ADD_FACTORY (gal_a11y_e_table_item_factory_get_type ())
+#define GAL_A11Y_TYPE_E_TABLE_CLICK_TO_ADD_FACTORY (gal_a11y_e_table_item_click_to_add_factory_get_type ())
#define GAL_A11Y_E_TABLE_CLICK_TO_ADD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_TABLE_CLICK_TO_ADD_FACTORY, GalA11yETableClickToAddFactory))
#define GAL_A11Y_E_TABLE_CLICK_TO_ADD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_TABLE_CLICK_TO_ADD_FACTORY, GalA11yETableClickToAddFactoryClass))
#define GAL_A11Y_IS_E_TABLE_CLICK_TO_ADD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_TABLE_CLICK_TO_ADD_FACTORY))
diff --git a/widgets/table/gal-a11y-e-table-item.c b/widgets/table/gal-a11y-e-table-item.c
index 5b0e565714..2c6de549b9 100644
--- a/widgets/table/gal-a11y-e-table-item.c
+++ b/widgets/table/gal-a11y-e-table-item.c
@@ -54,6 +54,7 @@ static GQuark quark_accessible_object = 0;
#define PARENT_TYPE (parent_type)
struct _GalA11yETableItemPrivate {
+ ETableItem *item;
gint cols;
gint rows;
gint selection_change_id;
@@ -77,20 +78,18 @@ item_finalized (gpointer user_data,
GalA11yETableItem *a11y;
GalA11yETableItemPrivate *priv;
- /* XXX GalA11yETableItem may already be finalized.
- * Just work around it for now. */
- if (!GAL_A11Y_IS_E_TABLE_ITEM (user_data))
- return;
-
a11y = GAL_A11Y_E_TABLE_ITEM (user_data);
priv = GET_PRIVATE (a11y);
+ priv->item = NULL;
+
atk_state_set_add_state (priv->state_set, ATK_STATE_DEFUNCT);
atk_object_notify_state_change (ATK_OBJECT (a11y), ATK_STATE_DEFUNCT, TRUE);
if (priv->selection)
gal_a11y_e_table_item_unref_selection (a11y);
+ g_object_unref (a11y);
}
static AtkStateSet *
@@ -224,6 +223,11 @@ eti_dispose (GObject *object)
priv->columns = NULL;
}
+ if (priv->item) {
+ g_object_weak_unref (G_OBJECT (priv->item), item_finalized, a11y);
+ priv->item = NULL;
+ }
+
if (parent_class->dispose)
parent_class->dispose (object);
}
@@ -1102,6 +1106,7 @@ gal_a11y_e_table_item_new (ETableItem *item)
accessible = ATK_OBJECT (a11y);
+ GET_PRIVATE (a11y)->item = item;
/* Initialize cell data. */
GET_PRIVATE (a11y)->cols = item->cols;
GET_PRIVATE (a11y)->rows = item->rows;
@@ -1143,7 +1148,7 @@ gal_a11y_e_table_item_new (ETableItem *item)
}
if (item)
- g_object_weak_ref (G_OBJECT (item), item_finalized, a11y);
+ g_object_weak_ref (G_OBJECT (item), item_finalized, g_object_ref (a11y));
esm = item->selection;