diff --git a/ChangeLog b/ChangeLog index f0b58229ff..e75cad5992 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-02-06 Matthew Barnes + + * gtk/gtklabel.c (gtk_label_set_label): Accept a NULL string. + 2009-02-03 Matthias Clasen Bug 538439 – tooltip may appear in upper left corner instead of diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 209c3692e8..91ab5ccb31 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -1760,11 +1760,10 @@ gtk_label_set_label (GtkLabel *label, const gchar *str) { g_return_if_fail (GTK_IS_LABEL (label)); - g_return_if_fail (str != NULL); g_object_freeze_notify (G_OBJECT (label)); - gtk_label_set_label_internal (label, g_strdup (str)); + gtk_label_set_label_internal (label, g_strdup (str ? str : "")); gtk_label_recalculate (label); g_object_thaw_notify (G_OBJECT (label));