summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Haneman <billh@src.gnome.org>2002-03-14 00:31:15 +0000
committerBill Haneman <billh@src.gnome.org>2002-03-14 00:31:15 +0000
commitcc01653664e22f80535b41a623b9b545614b6d6b (patch)
tree1c6a0316425eb29105a5f023fe6fe2527dcb37f8
parentd18cabae3b2ffc4c93ea28de740f1dc167d54946 (diff)
downloadatk-cc01653664e22f80535b41a623b9b545614b6d6b.tar.gz
Fix for SEGV triggered by test-gail-gnome, due to calling
g_type_class_peek (ATK_UTIL_CLASS) instead of g_type_class_ref (ATK_UTIL_CLASS).
-rw-r--r--ChangeLog7
-rwxr-xr-xatk/atkcomponent.h1
-rwxr-xr-xatk/atkutil.c10
3 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 66a1787..3b4c71b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-03-13 Bill Haneman <bill.haneman@sun.com>
+
+ * atk/atkutil.c (atk_object_get_root):
+ Changed g_type_class_peek to g_type_class_ref,
+ this seemed to be triggering a SEGV in some cases.
+
+
2002-03-12 Padraig O'Briain <padraig.obriain@sun.com>
* atk/atkgobjectaccessible.c (atk_gobject_accessible_dispose):
diff --git a/atk/atkcomponent.h b/atk/atkcomponent.h
index b551cd4..ccb73d1 100755
--- a/atk/atkcomponent.h
+++ b/atk/atkcomponent.h
@@ -54,6 +54,7 @@ struct _AtkComponentIface
guint (* add_focus_handler) (AtkComponent *component,
AtkFocusHandler handler);
+
gboolean (* contains) (AtkComponent *component,
gint x,
gint y,
diff --git a/atk/atkutil.c b/atk/atkutil.c
index 8212391..65a762a 100755
--- a/atk/atkutil.c
+++ b/atk/atkutil.c
@@ -286,15 +286,19 @@ atk_remove_key_event_listener (guint listener_id)
AtkObject*
atk_get_root (void)
{
- AtkUtilClass *klass = g_type_class_peek (ATK_TYPE_UTIL);
+ AtkUtilClass *klass = g_type_class_ref (ATK_TYPE_UTIL);
+ AtkObject *retval;
if (klass->get_root)
{
- return klass->get_root ();
+ retval = klass->get_root ();
}
else
{
- return NULL;
+ retval = NULL;
}
+ g_type_class_unref (klass);
+
+ return retval;
}
/**