mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Do not call g_object_unref when imageType comes out as UNKNOWN.
Avoids "(sharp:23220): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed" dumped to the console when an unsupported or invalid image is loaded.
This commit is contained in:
parent
49b44d8238
commit
005c628352
@ -76,7 +76,9 @@ class MetadataWorker : public NanAsyncWorker {
|
||||
}
|
||||
}
|
||||
// Clean up
|
||||
g_object_unref(image);
|
||||
if (imageType != UNKNOWN) {
|
||||
g_object_unref(image);
|
||||
}
|
||||
vips_error_clear();
|
||||
vips_thread_shutdown();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user