diff options
author | Bill Haneman <billh@src.gnome.org> | 2002-03-14 00:31:15 +0000 |
---|---|---|
committer | Bill Haneman <billh@src.gnome.org> | 2002-03-14 00:31:15 +0000 |
commit | cc01653664e22f80535b41a623b9b545614b6d6b (patch) | |
tree | 1c6a0316425eb29105a5f023fe6fe2527dcb37f8 /atk/atkutil.c | |
parent | d18cabae3b2ffc4c93ea28de740f1dc167d54946 (diff) | |
download | atk-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).
Diffstat (limited to 'atk/atkutil.c')
-rwxr-xr-x | atk/atkutil.c | 10 |
1 files changed, 7 insertions, 3 deletions
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; } /** |