From a00bad28d88e1af9f8290192ec90287a42f736ef Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Thu, 5 Apr 2018 22:12:40 -0400 Subject: Fix warnings from HiDPI commits *caja-pathbar: fix warning,and in the process maybe fix occasional segfaults on opening mounted volumes from the desktop *caja-icon-info: Stop gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed warning by handling NULL return from function finding the pixbuf caja-icon-canvas-item-c: do not use g_object_unref where it does not work Stop the g_object_unref: assertion 'G_IS_OBJECT (object)' failed warnings on closing icon views --- libcaja-private/caja-icon-info.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libcaja-private/caja-icon-info.c') 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); -- cgit v1.2.1