diff options
author | lukefromdc <[email protected]> | 2018-04-05 22:12:40 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-04-06 22:19:18 +0200 |
commit | a58d52a7cbfdd231b38b45af78f72ab067eff302 (patch) | |
tree | ddb590afc4e890de016cb83cd6d7c185aae9fb00 /libcaja-private | |
parent | 02207368c3095c832180c2b687e7b22b953981c6 (diff) | |
download | caja-a58d52a7cbfdd231b38b45af78f72ab067eff302.tar.bz2 caja-a58d52a7cbfdd231b38b45af78f72ab067eff302.tar.xz |
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
Diffstat (limited to 'libcaja-private')
-rw-r--r-- | libcaja-private/caja-icon-canvas-item.c | 2 | ||||
-rw-r--r-- | libcaja-private/caja-icon-info.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/libcaja-private/caja-icon-canvas-item.c b/libcaja-private/caja-icon-canvas-item.c index 162fb338..7763811d 100644 --- a/libcaja-private/caja-icon-canvas-item.c +++ b/libcaja-private/caja-icon-canvas-item.c @@ -280,7 +280,7 @@ caja_icon_canvas_item_finalize (GObject *object) if (details->rendered_surface != NULL) { - g_object_unref (details->rendered_surface); + cairo_surface_destroy (details->rendered_surface); } if (details->editable_text_layout != NULL) 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); |