a11y: fix a typo leading to a crash

text can't be NULL here, or we would have failed way earlier.
The original code from gail returned if the renderer text was NULL, and
we have to do that, or we'll end up calling e.g.
g_utf8_offset_to_pointer() on a NULL pointer.

https://bugzilla.redhat.com/show_bug.cgi?id=827930

https://bugzilla.gnome.org/show_bug.cgi?id=677551
This commit is contained in:
Cosimo Cecchi 2012-06-06 09:22:29 -04:00
parent 61001bc501
commit 3473577386

View File

@ -542,11 +542,8 @@ gtk_text_cell_accessible_get_character_extents (AtkText *text,
gtk_renderer = GTK_CELL_RENDERER_TEXT (gail_renderer->renderer);
g_object_get (gtk_renderer, "text", &renderer_text, NULL);
if (text == NULL)
{
g_free (renderer_text);
return;
}
if (renderer_text == NULL)
return;
parent = atk_object_get_parent (ATK_OBJECT (text));
if (GTK_IS_CONTAINER_CELL_ACCESSIBLE (parent))