diff options
author | Benjamin Otte <otte@redhat.com> | 2013-09-09 16:50:55 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2013-09-09 16:53:13 +0200 |
commit | 70ac2b24c3d400c854d8a9e0937afa076f9dbe7f (patch) | |
tree | 284e92a41e4464a3f03893bdafb91f212b80a671 /gtk/gtkpango.c | |
parent | 92edb7650086e1ec55b804a7d8032f220c740757 (diff) | |
download | gtk+-70ac2b24c3d400c854d8a9e0937afa076f9dbe7f.tar.gz |
pango: Handle case where pango_layout_get_text() returns NULL
Fixes crashers with accessibility
https://bugzilla.gnome.org/show_bug.cgi?id=707659
Diffstat (limited to 'gtk/gtkpango.c')
-rw-r--r-- | gtk/gtkpango.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkpango.c b/gtk/gtkpango.c index 40c94f3c13..ea688eaf8d 100644 --- a/gtk/gtkpango.c +++ b/gtk/gtkpango.c @@ -1014,7 +1014,7 @@ _gtk_pango_get_text_before (PangoLayout *layout, text = pango_layout_get_text (layout); - if (text[0] == 0) + if (text == NULL || text[0] == 0) { *start_offset = 0; *end_offset = 0; @@ -1115,7 +1115,7 @@ _gtk_pango_get_text_after (PangoLayout *layout, text = pango_layout_get_text (layout); - if (text[0] == 0) + if (text == NULL || text[0] == 0) { *start_offset = 0; *end_offset = 0; @@ -1222,7 +1222,7 @@ _gtk_pango_get_text_at (PangoLayout *layout, text = pango_layout_get_text (layout); - if (text[0] == 0) + if (text == NULL || text[0] == 0) { *start_offset = 0; *end_offset = 0; |