[gegl/threaded-base-classes: 8/13] tile_handler_cache: add debug print and bail if tile==NULL



commit 0da7ef5ea164948e43ba6d6dab76e893eb40a129
Author: Øyvind Kolås <pippin gimp org>
Date:   Thu Jun 26 22:25:17 2014 +0200

    tile_handler_cache: add debug print and bail if tile==NULL

 gegl/buffer/gegl-tile-handler-cache.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile-handler-cache.c b/gegl/buffer/gegl-tile-handler-cache.c
index f742228..cf897e2 100644
--- a/gegl/buffer/gegl-tile-handler-cache.c
+++ b/gegl/buffer/gegl-tile-handler-cache.c
@@ -343,6 +343,13 @@ gegl_tile_handler_cache_get_tile (GeglTileHandlerCache *cache,
       g_queue_unlink (cache_queue, &result->link);
       g_queue_push_head_link (cache_queue, &result->link);
       g_mutex_unlock (&mutex);
+      while (result->tile == NULL)
+      {
+        g_printerr ("NULL tile in %s %p %i %i %i %p\n", __FUNCTION__, result, result->x, result->y, 
result->z,
+                result->tile);
+        g_mutex_unlock (&mutex);
+        return NULL;
+      }
       return gegl_tile_ref (result->tile);
     }
   g_mutex_unlock (&mutex);


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