[gegl] buffer: make image-compare not crash when aux is NULL



commit 09a1c9a6df98b98561e137f9328849bbf697a8d6
Author: Ville Sokk <ville sokk gmail com>
Date:   Mon Aug 13 22:21:45 2012 +0300

    buffer: make image-compare not crash when aux is NULL

 operations/common/image-compare.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/operations/common/image-compare.c b/operations/common/image-compare.c
index 0e7ccca..a331811 100644
--- a/operations/common/image-compare.c
+++ b/operations/common/image-compare.c
@@ -73,6 +73,9 @@ process (GeglOperation       *operation,
   gfloat      *in_buf, *aux_buf, *a, *b;
   guchar      *out_buf, *out;
 
+  if (aux == NULL)
+    return TRUE;
+
   in_buf  = (void *) gegl_buffer_linear_open (input, result, &rowstride_in, cielab);
   aux_buf = (void *) gegl_buffer_linear_open (aux, result, &rowstride_aux, cielab);
   out_buf = (void *) gegl_buffer_linear_open (output, result, &rowstride_out, babl_format ("R'G'B' u8"));



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