Allow unsetting a pattern by passing NULL. (#156720, Tristan Van Berkom)

2004-11-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_set_pattern_internal): Allow
	unsetting a pattern by passing NULL.  (#156720, Tristan Van Berkom)
This commit is contained in:
Matthias Clasen 2004-11-03 06:20:33 +00:00 committed by Matthias Clasen
parent f41c59cce3
commit 9f3382613a
5 changed files with 16 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtklabel.c (gtk_label_set_pattern_internal): Allow
unsetting a pattern by passing NULL. (#156720, Tristan Van Berkom)
* gtk/gtkcombobox.c (gtk_combo_box_get_active): Don't crash
if the active_row reference has become invalid. (#157156,
Christophe Fergeau)

View File

@ -1,5 +1,8 @@
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtklabel.c (gtk_label_set_pattern_internal): Allow
unsetting a pattern by passing NULL. (#156720, Tristan Van Berkom)
* gtk/gtkcombobox.c (gtk_combo_box_get_active): Don't crash
if the active_row reference has become invalid. (#157156,
Christophe Fergeau)

View File

@ -1,5 +1,8 @@
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtklabel.c (gtk_label_set_pattern_internal): Allow
unsetting a pattern by passing NULL. (#156720, Tristan Van Berkom)
* gtk/gtkcombobox.c (gtk_combo_box_get_active): Don't crash
if the active_row reference has become invalid. (#157156,
Christophe Fergeau)

View File

@ -1,5 +1,8 @@
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtklabel.c (gtk_label_set_pattern_internal): Allow
unsetting a pattern by passing NULL. (#156720, Tristan Van Berkom)
* gtk/gtkcombobox.c (gtk_combo_box_get_active): Don't crash
if the active_row reference has become invalid. (#157156,
Christophe Fergeau)

View File

@ -1281,7 +1281,10 @@ gtk_label_set_pattern_internal (GtkLabel *label,
PangoAttrList *attrs;
g_return_if_fail (GTK_IS_LABEL (label));
attrs = gtk_label_pattern_to_attrs (label, pattern);
if (pattern)
attrs = gtk_label_pattern_to_attrs (label, pattern);
else
attrs = NULL;
if (label->effective_attrs)
pango_attr_list_unref (label->effective_attrs);