[gegl/newiter] iterator: fix double lock of linear buffer



commit 4990e4afd81a765c624c462f786f77f00554a314
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Wed Sep 11 13:46:32 2013 -0700

    iterator: fix double lock of linear buffer

 gegl/buffer/gegl-buffer-iterator.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-iterator.c b/gegl/buffer/gegl-buffer-iterator.c
index 14f7889..3aafb26 100644
--- a/gegl/buffer/gegl-buffer-iterator.c
+++ b/gegl/buffer/gegl-buffer-iterator.c
@@ -411,12 +411,11 @@ prepare_iteration (GeglBufferIterator *iter)
       /* Format converison needed */
       if (gegl_buffer_get_format (sub->buffer) != sub->format)
         sub->flags |= GEGL_ITERATOR_INCOMPATIBLE;
-
       /* Incompatable tiles */
-      if ((priv->origin_tile.x      != buf->shift_x) ||
-          (priv->origin_tile.y      != buf->shift_y) ||
-          (priv->origin_tile.width  != buf->tile_width) ||
-          (priv->origin_tile.height != buf->tile_height))
+      else if ((priv->origin_tile.x      != buf->shift_x) ||
+               (priv->origin_tile.y      != buf->shift_y) ||
+               (priv->origin_tile.width  != buf->tile_width) ||
+               (priv->origin_tile.height != buf->tile_height))
         {
           /* Check if the buffer is a linear buffer */
           if ((buf->extent.x      == -buf->shift_x) &&


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