label: Don't crash when a builder file contains unknown attributes

This commit is contained in:
Benjamin Otte 2011-04-25 01:34:27 +02:00
parent 8331b45a5f
commit 187f91eb90

View File

@ -1531,11 +1531,12 @@ pango_start_element (GMarkupParseContext *context,
}
attr = attribute_from_text (data->builder, name, value, error);
attr->start_index = start_val;
attr->end_index = end_val;
if (attr)
{
attr->start_index = start_val;
attr->end_index = end_val;
if (!data->attrs)
data->attrs = pango_attr_list_new ();