diff options
author | Milan Crha <mcrha@redhat.com> | 2011-06-06 21:54:19 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:26 +0800 |
commit | e68165697e841eba3b957cb64b96b9c404ba1e15 (patch) | |
tree | c9960e8a75a7e444593930ffb436a31d8f3880bc | |
parent | 7339bac110f97455284b90af976f762e7b1c35aa (diff) | |
download | gsoc2013-evolution-e68165697e841eba3b957cb64b96b9c404ba1e15.tar gsoc2013-evolution-e68165697e841eba3b957cb64b96b9c404ba1e15.tar.gz gsoc2013-evolution-e68165697e841eba3b957cb64b96b9c404ba1e15.tar.bz2 gsoc2013-evolution-e68165697e841eba3b957cb64b96b9c404ba1e15.tar.lz gsoc2013-evolution-e68165697e841eba3b957cb64b96b9c404ba1e15.tar.xz gsoc2013-evolution-e68165697e841eba3b957cb64b96b9c404ba1e15.tar.zst gsoc2013-evolution-e68165697e841eba3b957cb64b96b9c404ba1e15.zip |
Bug #643526 - Crash in et_get_n_children
-rw-r--r-- | calendar/gui/ea-cal-view.c | 4 | ||||
-rw-r--r-- | widgets/table/gal-a11y-e-table.c | 7 | ||||
-rw-r--r-- | widgets/table/gal-a11y-e-tree.c | 3 |
3 files changed, 6 insertions, 8 deletions
diff --git a/calendar/gui/ea-cal-view.c b/calendar/gui/ea-cal-view.c index 300ca3b738..7e50284226 100644 --- a/calendar/gui/ea-cal-view.c +++ b/calendar/gui/ea-cal-view.c @@ -174,7 +174,6 @@ static AtkObject* ea_cal_view_get_parent (AtkObject *accessible) { ECalendarView *cal_view; - GnomeCalendar *gnomeCalendar; GtkWidget *widget; g_return_val_if_fail (EA_IS_CAL_VIEW (accessible), NULL); @@ -184,9 +183,8 @@ ea_cal_view_get_parent (AtkObject *accessible) return NULL; cal_view = E_CALENDAR_VIEW (widget); - gnomeCalendar = e_calendar_view_get_calendar (cal_view); - return gtk_widget_get_accessible (GTK_WIDGET (gnomeCalendar)); + return gtk_widget_get_accessible (gtk_widget_get_parent (GTK_WIDGET (cal_view))); } static void diff --git a/widgets/table/gal-a11y-e-table.c b/widgets/table/gal-a11y-e-table.c index 5db3f44b22..436de1ec0f 100644 --- a/widgets/table/gal-a11y-e-table.c +++ b/widgets/table/gal-a11y-e-table.c @@ -131,7 +131,7 @@ et_get_n_children (AtkObject *accessible) et = E_TABLE (gtk_accessible_get_widget (GTK_ACCESSIBLE (a11y))); - if (et->group) { + if (et && et->group) { if (E_IS_TABLE_GROUP_LEAF (et->group)) n = 1; else if (E_IS_TABLE_GROUP_CONTAINER (et->group)) { @@ -155,6 +155,8 @@ et_ref_child (AtkObject *accessible, gint child_no; et = E_TABLE (gtk_accessible_get_widget (GTK_ACCESSIBLE (a11y))); + if (!et) + return NULL; child_no = et_get_n_children (accessible); if (i == 0 || i < child_no - 1) { @@ -283,8 +285,7 @@ gal_a11y_e_table_new (GObject *widget) a11y = g_object_new (gal_a11y_e_table_get_type (), NULL); - /* FIXME No way to do this in GTK 3. */ - /*GTK_ACCESSIBLE (a11y)->widget = GTK_WIDGET (widget);*/ + gtk_accessible_set_widget (GTK_ACCESSIBLE (a11y), GTK_WIDGET (widget)); /* we need to init all the children for multiple table items */ if (table && gtk_widget_get_mapped (GTK_WIDGET (table)) && table->group && E_IS_TABLE_GROUP_CONTAINER (table->group)) { diff --git a/widgets/table/gal-a11y-e-tree.c b/widgets/table/gal-a11y-e-tree.c index 4507e21363..f26c525550 100644 --- a/widgets/table/gal-a11y-e-tree.c +++ b/widgets/table/gal-a11y-e-tree.c @@ -178,8 +178,7 @@ gal_a11y_e_tree_new (GObject *widget) a11y = g_object_new (gal_a11y_e_tree_get_type (), NULL); - /* FIXME No way to do this in GTK 3. */ - /*GTK_ACCESSIBLE (a11y)->widget = GTK_WIDGET (widget);*/ + gtk_accessible_set_widget (GTK_ACCESSIBLE (a11y), GTK_WIDGET (widget)); return ATK_OBJECT (a11y); } |