Mercurial > geeqie
changeset 1251:ecfe3732f00a
fixed glib warning
author | nadvornik |
---|---|
date | Sat, 24 Jan 2009 12:15:01 +0000 |
parents | 6ccad430c4cb |
children | fd16a3af0e88 |
files | src/image.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/image.c Sat Jan 24 10:09:29 2009 +0000 +++ b/src/image.c Sat Jan 24 12:15:01 2009 +0000 @@ -1005,7 +1005,7 @@ /* read_exif and similar functions can actually notice that the file has changed and triger a notification that removes the pixbuf from cache and unref it. Therefore we must ref it here before it is taken over by the renderer. */ - g_object_ref(pixbuf); + if (pixbuf) g_object_ref(pixbuf); if (imd->image_fd && imd->image_fd->user_orientation) imd->orientation = imd->image_fd->user_orientation; @@ -1045,7 +1045,7 @@ pixbuf_renderer_set_orientation((PixbufRenderer *)imd->pr, imd->orientation); } - g_object_unref(pixbuf); + if (pixbuf) g_object_unref(pixbuf); if (imd->color_profile_enable) {