[gegl] Bug #633969: Check if aux_rect is NULL before dereferencing



commit 742446507e819755bd3f44e2d47b157f8cd19ab2
Author: Mukund Sivaraman <muks banu com>
Date:   Tue Apr 5 00:58:50 2011 +0530

    Bug #633969: Check if aux_rect is NULL before dereferencing

 operations/workshop/hstack.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/operations/workshop/hstack.c b/operations/workshop/hstack.c
index a8a2f59..084336c 100644
--- a/operations/workshop/hstack.c
+++ b/operations/workshop/hstack.c
@@ -46,12 +46,12 @@ get_bounding_box (GeglOperation *operation)
   GeglRectangle *aux_rect = gegl_operation_source_get_bounding_box (operation,
                                                                       "aux");
 
-  if (!in_rect)
+  if (!in_rect || !aux_rect)
     return result;
 
   result = *in_rect;
   if (result.width  != 0 &&
-      result.height  != 0)
+      result.height != 0)
     {
       result.width += aux_rect->width;
       if (aux_rect->height > result.height)



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