aboutsummaryrefslogtreecommitdiffstats
path: root/a11y
diff options
context:
space:
mode:
Diffstat (limited to 'a11y')
-rw-r--r--a11y/ChangeLog12
-rw-r--r--a11y/addressbook/ea-minicard-view.c8
-rw-r--r--a11y/addressbook/ea-minicard.c8
3 files changed, 24 insertions, 4 deletions
diff --git a/a11y/ChangeLog b/a11y/ChangeLog
index e9c173661d..44113cf288 100644
--- a/a11y/ChangeLog
+++ b/a11y/ChangeLog
@@ -1,3 +1,15 @@
+2005-04-06 Yu Mengjie <meng-jie.yu@sun.com>
+
+ * addressbook/ea-minicard-view.c: (ea_minicard_view_get_name),
+ (ea_minicard_view_ref_state_set):
+ return proper atk_object name and atk_stateset to avoid crash.
+
+ * addressbook/ea-minicard.c: (ea_minicard_get_name),
+ (ea_minicard_ref_state_set):
+ return proper atk_object name and atk_stateset to avoid crash.
+
+ Fixes #74404
+
2005-02-23 Li Yuan <li.yuan@sun.com>
Fix for 72897 and 72797.
diff --git a/a11y/addressbook/ea-minicard-view.c b/a11y/addressbook/ea-minicard-view.c
index 1170448576..b66dd6585e 100644
--- a/a11y/addressbook/ea-minicard-view.c
+++ b/a11y/addressbook/ea-minicard-view.c
@@ -146,6 +146,9 @@ ea_minicard_view_get_name (AtkObject *accessible)
reflow = E_REFLOW(atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible)));
+ if (!reflow)
+ return NULL;
+
string = g_strdup_printf (ngettext ("current addressbook folder has %d card",
"current addressbook folder has %d cards",
reflow->count), reflow->count);
@@ -206,10 +209,11 @@ static AtkStateSet *ea_minicard_view_ref_state_set (AtkObject *obj)
state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (obj);
if( !state_set )
- return NULL;
+ state_set = atk_state_set_new ();
+
gobj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (obj));
if( !gobj )
- return NULL;
+ return state_set;
atk_state_set_add_state (state_set, ATK_STATE_ENABLED);
atk_state_set_add_state (state_set, ATK_STATE_SENSITIVE);
diff --git a/a11y/addressbook/ea-minicard.c b/a11y/addressbook/ea-minicard.c
index ec8b7f2056..2bde576ab3 100644
--- a/a11y/addressbook/ea-minicard.c
+++ b/a11y/addressbook/ea-minicard.c
@@ -132,6 +132,9 @@ ea_minicard_get_name (AtkObject *accessible)
card = E_MINICARD(atk_gobject_accessible_get_object
(ATK_GOBJECT_ACCESSIBLE(accessible)));
+ if (!card)
+ return NULL;
+
g_object_get (card->header_text, "text", &string, NULL);
if (e_contact_get (card->contact, E_CONTACT_IS_LIST))
@@ -189,10 +192,11 @@ static AtkStateSet *ea_minicard_ref_state_set (AtkObject *obj)
state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (obj);
if( !state_set )
- return NULL;
+ state_set = atk_state_set_new ();
+
gobj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (obj));
if( !gobj )
- return NULL;
+ return state_set;
atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE);
atk_state_set_add_state (state_set, ATK_STATE_ENABLED);