From 7dac6a2b01b4c56fe45a1d917a613a676f02b03a Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Thu, 4 Dec 2003 18:17:23 +0000 Subject: [PATCH] Allow gtk_label_set_attributes() take NULL. See bug #128517. 2003-12-04 Mark McLoughlin * gtk/gtklabel.c: (gtk_label_set_attributes_internal): Allow gtk_label_set_attributes() take NULL. See bug #128517. --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtklabel.c | 3 ++- 6 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 27cce4ec11..4a0e26ed35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-12-04 Mark McLoughlin + + * gtk/gtklabel.c: (gtk_label_set_attributes_internal): Allow + gtk_label_set_attributes() take NULL. See bug #128517. + 2003-12-03 Federico Mena Quintero * gtk/gtkfilechooserentry.c (struct _GtkFileChooserEntry): Removed diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 27cce4ec11..4a0e26ed35 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2003-12-04 Mark McLoughlin + + * gtk/gtklabel.c: (gtk_label_set_attributes_internal): Allow + gtk_label_set_attributes() take NULL. See bug #128517. + 2003-12-03 Federico Mena Quintero * gtk/gtkfilechooserentry.c (struct _GtkFileChooserEntry): Removed diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 27cce4ec11..4a0e26ed35 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +2003-12-04 Mark McLoughlin + + * gtk/gtklabel.c: (gtk_label_set_attributes_internal): Allow + gtk_label_set_attributes() take NULL. See bug #128517. + 2003-12-03 Federico Mena Quintero * gtk/gtkfilechooserentry.c (struct _GtkFileChooserEntry): Removed diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 27cce4ec11..4a0e26ed35 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2003-12-04 Mark McLoughlin + + * gtk/gtklabel.c: (gtk_label_set_attributes_internal): Allow + gtk_label_set_attributes() take NULL. See bug #128517. + 2003-12-03 Federico Mena Quintero * gtk/gtkfilechooserentry.c (struct _GtkFileChooserEntry): Removed diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 27cce4ec11..4a0e26ed35 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2003-12-04 Mark McLoughlin + + * gtk/gtklabel.c: (gtk_label_set_attributes_internal): Allow + gtk_label_set_attributes() take NULL. See bug #128517. + 2003-12-03 Federico Mena Quintero * gtk/gtkfilechooserentry.c (struct _GtkFileChooserEntry): Removed diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index b45ba9b605..874baf1caa 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -874,7 +874,8 @@ gtk_label_set_attributes_internal (GtkLabel *label, if (!label->use_markup && !label->use_underline) { - pango_attr_list_ref (attrs); + if (attrs) + pango_attr_list_ref (attrs); if (label->effective_attrs) pango_attr_list_unref (label->effective_attrs); label->effective_attrs = attrs;