layout: Never return NULL from pango_layout_get_text()
authorBenjamin Otte <otte@redhat.com>
Mon, 9 Sep 2013 15:12:50 +0000 (17:12 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 9 Sep 2013 15:12:50 +0000 (17:12 +0200)
commit114d5bfe9d54d1efabc233312d2c23267cf16f59
tree055b5cec8b2edf61ed9e051096144c09c11e0909
parent285be5bd7ee3ce87bb027b405be674d6f91995d1
layout: Never return NULL from pango_layout_get_text()

layouts get initialized with text == NULL as an optimization (avoid a
malloc). But pango_layout_set_text (layout, NULL, 0); will set the text
to "", so it is impossible to set a NULL text.

Fxies crashers in various places that assume NULL return values never
happen.

https://bugzilla.gnome.org/show_bug.cgi?id=707659
pango/pango-layout.c