mirror of https://github.com/GNOME/gimp.git
file-jpeg: unref GeglBuffer in case of a problem (contd.)
The duplicate code in load_image() and load_thumbnail_image() should be merged at some point into a single function.
This commit is contained in:
parent
b6a2d45821
commit
3cb0b2f35e
|
@ -671,7 +671,7 @@ load_thumbnail_image (const gchar *filename,
|
|||
guchar **rowbuf;
|
||||
GimpImageBaseType image_type;
|
||||
GimpImageType layer_type;
|
||||
GeglBuffer *buffer;
|
||||
GeglBuffer *buffer = NULL;
|
||||
gint tile_height;
|
||||
gint scanlines;
|
||||
gint i, start, end;
|
||||
|
@ -712,6 +712,9 @@ load_thumbnail_image (const gchar *filename,
|
|||
exif_data = NULL;
|
||||
}
|
||||
|
||||
if (buffer)
|
||||
g_object_unref (buffer);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue