[gegl] buffer: handle NULL dest parameter in gegl_rectangle_subtract_bounding_box()



commit 1c059bdc9145ed19217400326ea406098008eaa3
Author: Ell <ell_se yahoo com>
Date:   Mon Jul 29 22:20:37 2019 +0300

    buffer: handle NULL dest parameter in gegl_rectangle_subtract_bounding_box()

 gegl/buffer/gegl-rectangle.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gegl/buffer/gegl-rectangle.c b/gegl/buffer/gegl-rectangle.c
index 99e69da3e..963e388da 100644
--- a/gegl/buffer/gegl-rectangle.c
+++ b/gegl/buffer/gegl-rectangle.c
@@ -243,12 +243,14 @@ gegl_rectangle_subtract_bounding_box (GeglRectangle       *dest,
 
   if (mx1 < mx2 && my1 < my2)
     {
-      gegl_rectangle_set (dest, mx1, my1, mx2 - mx1, my2 - my1);
+      if (dest)
+        gegl_rectangle_set (dest, mx1, my1, mx2 - mx1, my2 - my1);
       return TRUE;
     }
   else
     {
-      gegl_rectangle_set (dest, 0, 0, 0, 0);
+      if (dest)
+        gegl_rectangle_set (dest, 0, 0, 0, 0);
       return FALSE;
     }
 }


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