[gegl] gegl: don't call gegl_node_invalidated() on a NULL node



commit c71b573fc525e54e54411c95472fa903e9ff3de3
Author: Michael Natterer <mitch gimp org>
Date:   Mon May 9 01:00:32 2016 +0200

    gegl: don't call gegl_node_invalidated() on a NULL node
    
    in gegl_operation_invalidate(). Also, less weird code in that function.

 gegl/operation/gegl-operation.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/gegl/operation/gegl-operation.c b/gegl/operation/gegl-operation.c
index a2d9cd5..c9de0ee 100644
--- a/gegl/operation/gegl-operation.c
+++ b/gegl/operation/gegl-operation.c
@@ -520,15 +520,10 @@ gegl_operation_invalidate (GeglOperation       *operation,
                            const GeglRectangle *roi,
                            gboolean             clear_cache)
 {
-  GeglNode *node = NULL;
-
-  if (!operation)
-    return;
-
   g_return_if_fail (GEGL_IS_OPERATION (operation));
-  node = operation->node;
 
-  gegl_node_invalidated (node, roi, clear_cache);
+  if (operation->node)
+    gegl_node_invalidated (operation->node, roi, clear_cache);
 }
 
 gboolean


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