self->priv->rendered_pixbuf = ensure_stated_icon_from_info (self, context, info);
if (info)
- gtk_icon_info_free (info);
+ g_object_unref (info);
}
static void
case GTK_IMAGE_STOCK:
icon_set = gtk_style_context_lookup_icon_set (context, self->priv->stock_id);
- ensure_pixbuf_for_icon_set (self, context, icon_set);
+ if (icon_set != NULL)
+ ensure_pixbuf_for_icon_set (self, context, icon_set);
+ else
+ pixbuf = NULL;
break;
case GTK_IMAGE_ICON_SET:
_gtk_icon_helper_clear (self);
if (icon_name != NULL &&
- g_strcmp0 (icon_name, "") != 0)
+ icon_name[0] != '\0')
{
self->priv->storage_type = GTK_IMAGE_ICON_NAME;
self->priv->icon_name = g_strdup (icon_name);
{
_gtk_icon_helper_clear (self);
- if (stock_id != NULL)
+ if (stock_id != NULL &&
+ stock_id[0] != '\0')
{
self->priv->storage_type = GTK_IMAGE_STOCK;
self->priv->stock_id = g_strdup (stock_id);