[gegl] webp-load: guard against NULL error
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] webp-load: guard against NULL error
- Date: Sun, 12 Mar 2017 20:42:23 +0000 (UTC)
commit 807305cc36da59eb3c4e5cab8fc6f7d557622a93
Author: Øyvind Kolås <pippin gimp org>
Date: Sun Mar 12 21:41:57 2017 +0100
webp-load: guard against NULL error
operations/external/webp-load.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/operations/external/webp-load.c b/operations/external/webp-load.c
index c525536..7e34608 100644
--- a/operations/external/webp-load.c
+++ b/operations/external/webp-load.c
@@ -205,8 +205,11 @@ prepare (GeglOperation *operation)
p->stream = gegl_gio_open_input_stream (o->uri, o->path, &p->file, &error);
if (p->stream == NULL)
{
- g_warning ("%s", error->message);
- g_error_free (error);
+ if (error)
+ {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ }
cleanup (operation);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]