diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2010-11-24 01:13:27 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2010-12-04 15:39:39 +0100 |
commit | e47c8e2490bff0ac41bd5ec54bfce2df6b018aa4 (patch) | |
tree | 28304f60f736a8da0dab1c697765c98dbb986fbd /gtk/gtkstyle.c | |
parent | 5d496aa7f3d05c7e449580c6f8d36154b66d2636 (diff) | |
download | gtk+-e47c8e2490bff0ac41bd5ec54bfce2df6b018aa4.tar.gz |
GtkStyle: Return the default icon set if no context is attached.
Diffstat (limited to 'gtk/gtkstyle.c')
-rw-r--r-- | gtk/gtkstyle.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index cdd12491c6..ad23f22a22 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -1007,7 +1007,10 @@ gtk_style_lookup_icon_set (GtkStyle *style, priv = GTK_STYLE_GET_PRIVATE (style); - return gtk_style_context_lookup_icon_set (priv->context, stock_id); + if (priv->context) + return gtk_style_context_lookup_icon_set (priv->context, stock_id); + + return gtk_icon_factory_lookup_default (stock_id); } /** |