[gegl] fattal02: ensure gaussian pyramid has at least one level (issue #266)



commit f27cb728be7fecb07df967c86e156d5490bedfa7
Author: Thomas Manni <thomas manni free fr>
Date:   Wed Feb 3 19:47:11 2021 +0100

    fattal02: ensure gaussian pyramid has at least one level (issue #266)

 operations/common/fattal02.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/operations/common/fattal02.c b/operations/common/fattal02.c
index 68e15c9c4..120dd8c85 100644
--- a/operations/common/fattal02.c
+++ b/operations/common/fattal02.c
@@ -1117,6 +1117,11 @@ fattal02_tonemap (const gfloat        *input,   /* Y */
         min_size /= 2;
       }
 
+    if (! levels)
+      {
+        levels = 1;
+      }
+
     pyramid = g_new (gfloat*, levels);
     fattal02_create_gaussian_pyramids (H, extent, pyramid, levels);
   }


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