[gegl] tiff-load: avoid crashing on error without gerror set



commit f43e875baa6e2753622d9d127837fac752b58ebb
Author: Øyvind Kolås <pippin gimp org>
Date:   Sun Mar 12 20:49:27 2017 +0100

    tiff-load: avoid crashing on error without gerror set

 operations/external/tiff-load.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/operations/external/tiff-load.c b/operations/external/tiff-load.c
index ff2a1c5..204956a 100644
--- a/operations/external/tiff-load.c
+++ b/operations/external/tiff-load.c
@@ -728,8 +728,11 @@ prepare(GeglOperation *operation)
         p->can_seek = g_seekable_can_seek(G_SEEKABLE(p->stream));
       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]