[gegl] buffer: turn an abort into a console warning



commit 10e27225497190cc1d52479aebcc98c2f445aba5
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Sat Mar 17 14:43:44 2012 +0000

    buffer: turn an abort into a console warning
    
    When processing a 0x0 px region with GeglBufferIterator the code used to die

 gegl/buffer/gegl-buffer-iterator.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-iterator.c b/gegl/buffer/gegl-buffer-iterator.c
index fc67bdf..55575c2 100644
--- a/gegl/buffer/gegl-buffer-iterator.c
+++ b/gegl/buffer/gegl-buffer-iterator.c
@@ -120,9 +120,7 @@ static void gegl_buffer_tile_iterator_init (GeglBufferTileIterator *i,
 {
   g_assert (i);
   memset (i, 0, sizeof (GeglBufferTileIterator));
-  if (roi.width == 0 ||
-      roi.height == 0)
-    g_error ("eeek");
+
   i->buffer = buffer;
   i->roi = roi;
   i->next_row    = 0;
@@ -133,6 +131,9 @@ static void gegl_buffer_tile_iterator_init (GeglBufferTileIterator *i,
   i->write = write;
   i->max_size = i->buffer->tile_storage->tile_width *
                 i->buffer->tile_storage->tile_height;
+
+  /* return at the end,. we still want things initialized a bit .. */
+  g_return_if_fail (roi.width != 0 && roi.height != 0);
 }
 
 static gboolean



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