[gegl/gsoc2009-gpu] gegl-buffer-iterator.c: fix segmentation fault that is causing automated tests to fail



commit 0fbf36df646b7cd749ee5fe522080672700c124d
Author: Jerson Michael Perpetua <jersonperpetua gmail com>
Date:   Sun Aug 23 02:19:27 2009 +0800

    gegl-buffer-iterator.c: fix segmentation fault that is causing automated tests to fail

 gegl/buffer/gegl-buffer-iterator.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-iterator.c b/gegl/buffer/gegl-buffer-iterator.c
index c1cede2..47eeca0 100644
--- a/gegl/buffer/gegl-buffer-iterator.c
+++ b/gegl/buffer/gegl-buffer-iterator.c
@@ -520,17 +520,15 @@ gegl_buffer_iterator_next (GeglBufferIterator *iterator)
     {
       for (no = 0; no < i->iterable_count; no++)
         {
-          gint tile_width  = i->i[no].buffer->tile_storage->tile_width;
-          gint tile_height = i->i[no].buffer->tile_storage->tile_height;
-
           gboolean direct_access
             = (i->flags[no] & GEGL_BUFFER_SCAN_COMPATIBLE
                && i->flags[no] & GEGL_BUFFER_FORMAT_COMPATIBLE
-               && i->roi[no].width == tile_width);
+               && i->roi[no].width
+                    == i->i[no].buffer->tile_storage->tile_width);
 
           gboolean gpu_direct_access
-            = (i->roi[no].height == tile_height
-               && direct_access);
+            = (direct_access && i->roi[no].height
+                 == i->i[no].buffer->tile_storage->tile_height);
 
           if (i->flags[no] & GEGL_BUFFER_READ
               || i->flags[no] & GEGL_BUFFER_WRITE)



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