summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-icon-info.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcaja-private/caja-icon-info.c')
-rw-r--r--libcaja-private/caja-icon-info.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libcaja-private/caja-icon-info.c b/libcaja-private/caja-icon-info.c
index 75c3330c..66ff7483 100644
--- a/libcaja-private/caja-icon-info.c
+++ b/libcaja-private/caja-icon-info.c
@@ -643,6 +643,9 @@ caja_icon_info_get_surface_nodefault_at_size (CajaIconInfo *icon,
cairo_surface_t *surface;
pixbuf = caja_icon_info_get_pixbuf_nodefault_at_size (icon, forced_size);
+ /*catch the case of caja_icon_info_get_pixbuf_nodefault_at_size returning NULL */
+ if (!pixbuf)
+ return NULL;
surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, icon->orig_scale, NULL);
g_object_unref (pixbuf);