[gegl] webp-load: avoid warning by not using g_clear_pointer



commit 106390f6d58a87bff9f24bcbeab00b918b7a2ace
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Sep 24 14:54:04 2018 +0200

    webp-load: avoid warning by not using g_clear_pointer

 operations/external/webp-load.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/operations/external/webp-load.c b/operations/external/webp-load.c
index ad939b9c6..395ccbd40 100644
--- a/operations/external/webp-load.c
+++ b/operations/external/webp-load.c
@@ -61,7 +61,9 @@ cleanup(GeglOperation *operation)
 
   if (p != NULL)
     {
-      g_clear_pointer (&p->decoder, (GDestroyNotify) WebPIDelete);
+      if (p->decoder)
+        WebPIDelete (p->decoder);
+      p->decoder = NULL;
 
       if (p->config != NULL)
         WebPFreeDecBuffer (&p->config->output);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]