[gegl/soc-2011-warp] gegl_buffer_get_unlocked: fix a potential dereference of null pointer



commit 586c7ac85c8165e30a68cb3c8ba7608f53fa05d8
Author: Michael Murà <batolettre gmail com>
Date:   Tue Aug 2 10:46:17 2011 +0200

    gegl_buffer_get_unlocked: fix a potential dereference of null pointer

 gegl/buffer/gegl-buffer-access.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-access.c b/gegl/buffer/gegl-buffer-access.c
index 5d8e5fe..b840309 100644
--- a/gegl/buffer/gegl-buffer-access.c
+++ b/gegl/buffer/gegl-buffer-access.c
@@ -954,6 +954,8 @@ gegl_buffer_get_unlocked (GeglBuffer          *buffer,
       gegl_buffer_iterate (buffer, NULL, dest_buf, rowstride, FALSE, format, 0);
       return;
     }
+
+  g_return_if_fail (rect);
   if (rect->width == 0 ||
       rect->height == 0)
     {



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