[gegl] common/warp: free stamp lut only when its allocated first



commit 1de221007e52314f558176d5120a433489f116e0
Author: Alexia Death <alexiadeath gmail com>
Date:   Tue Feb 18 22:17:48 2014 +0200

    common/warp: free stamp lut only when its allocated first

 operations/common/warp.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/operations/common/warp.c b/operations/common/warp.c
index 4efe3b8..68d178f 100644
--- a/operations/common/warp.c
+++ b/operations/common/warp.c
@@ -389,8 +389,11 @@ process (GeglOperation       *operation,
   priv->last_point_set = FALSE;
 
   /* free the LUT */
-  g_free (priv->lookup);
-  priv->lookup = NULL;
+  if (priv->lookup)
+    {
+      g_free (priv->lookup);
+      priv->lookup = NULL;
+    }
 
   return TRUE;
 }


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