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:
@ -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))
|
||||
|
||||
Reference in New Issue
Block a user