[gtk+] label: Don't crash when a builder file contains unknown attributes
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] label: Don't crash when a builder file contains unknown attributes
- Date: Tue, 26 Apr 2011 22:44:12 +0000 (UTC)
commit 187f91eb90d15c14ffed03bfedbff457508a98ec
Author: Benjamin Otte <otte redhat com>
Date: Mon Apr 25 01:34:27 2011 +0200
label: Don't crash when a builder file contains unknown attributes
gtk/gtklabel.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 45531d8..2fb4dc9 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]