[gtk+] iconhelper: treat the empty string as a NULL stock-id



commit 7114e63ceea8a4b56069e523abdeceb0b52e29b1
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Oct 26 16:32:14 2012 +0200

    iconhelper: treat the empty string as a NULL stock-id
    
    https://bugzilla.gnome.org/show_bug.cgi?id=687025

 gtk/gtkiconhelper.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c
index 74eae69..10ce249 100644
--- a/gtk/gtkiconhelper.c
+++ b/gtk/gtkiconhelper.c
@@ -469,7 +469,8 @@ _gtk_icon_helper_set_stock_id (GtkIconHelper *self,
 {
   _gtk_icon_helper_clear (self);
 
-  if (stock_id != NULL)
+  if (stock_id != NULL &&
+      g_strcmp0 (stock_id, "") != 0)
     {
       self->priv->storage_type = GTK_IMAGE_STOCK;
       self->priv->stock_id = g_strdup (stock_id);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]