Skip to content

Commit

Permalink
Fix crash in fallback mime icon loading code under GTK3
Browse files Browse the repository at this point in the history
  • Loading branch information
b4n committed Nov 18, 2013
1 parent cebc20a commit 1dfc107
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ui_utils.c
Expand Up @@ -2708,6 +2708,9 @@ GdkPixbuf *ui_get_mime_icon(const gchar *mime_type, GtkIconSize size)
{
#if GTK_CHECK_VERSION(3, 0, 0)
GtkStyleContext *ctx = gtk_style_context_new();
GtkWidgetPath *path = gtk_widget_path_new();
gtk_style_context_set_path(ctx, path);
gtk_widget_path_unref(path);
icon = gtk_icon_set_render_icon_pixbuf(icon_set, ctx, size);
g_object_unref(ctx);
#else
Expand Down

0 comments on commit 1dfc107

Please sign in to comment.