[gegl] operations: fixing issue #169, crash in svg:src-in without input connected



commit 06b929e3b69eda74893e5076b88cf2f0f91be247
Author: Øyvind Kolås <pippin gimp org>
Date:   Thu Jun 6 10:54:13 2019 +0200

    operations: fixing issue #169, crash in svg:src-in without input connected

 operations/generated/src-in.c              | 5 ++++-
 operations/generated/svg-12-porter-duff.rb | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/operations/generated/src-in.c b/operations/generated/src-in.c
index 31fc955bf..afa739c25 100644
--- a/operations/generated/src-in.c
+++ b/operations/generated/src-in.c
@@ -110,8 +110,11 @@ process (GeglOperation        *op,
 
 static GeglRectangle get_bounding_box (GeglOperation *self)
 {
+  GeglRectangle ret={0,0,1,1};
   GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (self, "input");
-  return *in_rect;
+  if (in_rect)
+    ret = *in_rect;
+  return ret;
 }
 
 
diff --git a/operations/generated/svg-12-porter-duff.rb b/operations/generated/svg-12-porter-duff.rb
index 00655fd99..2e1f9dbd9 100755
--- a/operations/generated/svg-12-porter-duff.rb
+++ b/operations/generated/svg-12-porter-duff.rb
@@ -310,8 +310,11 @@ b.each do
 
 static GeglRectangle get_bounding_box (GeglOperation *self)
 {
+  GeglRectangle ret={0,0,1,1};
   GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (self, \"input\");
-  return *in_rect;
+  if (in_rect)
+    ret = *in_rect;
+  return ret;
 }
 
 


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