Accept a NULL string.

2009-02-06  Matthew Barnes  <mbarnes@redhat.com>

	* gtk/gtklabel.c (gtk_label_set_label): Accept a NULL string.


svn path=/trunk/; revision=22289
This commit is contained in:
Matthew Barnes 2009-02-06 15:49:26 +00:00 committed by Matthew Barnes
parent c4bcc3e989
commit 302cc82c71
2 changed files with 5 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2009-02-06 Matthew Barnes <mbarnes@redhat.com>
* gtk/gtklabel.c (gtk_label_set_label): Accept a NULL string.
2009-02-03 Matthias Clasen <mclasen@redhat.com>
Bug 538439 tooltip may appear in upper left corner instead of

View File

@ -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));