[gimp/gimp-2-10] Issue #2785: Fill by line art detection produces Segmentation fault...



commit b35941ec4c1dfa0dd4ab2e1e0f35d436afd8d2ba
Author: Jehan <jehan girinstud io>
Date:   Sun Jan 13 17:40:25 2019 +0100

    Issue #2785: Fill by line art detection produces Segmentation fault...
    
    ... with some images.
    
    (cherry picked from commit 036ccc70cf5e6d5da24749485c0747c2c95eeef7)

 app/core/gimplineart.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimplineart.c b/app/core/gimplineart.c
index e682b4c517..5e1aee0dcb 100644
--- a/app/core/gimplineart.c
+++ b/app/core/gimplineart.c
@@ -1562,8 +1562,11 @@ gimp_lineart_curvature_extremums (gfloat *curvatures,
                   }
                 g_free (p);
               }
-            curvatures[(gint) max_curvature_pixel.x + (gint) max_curvature_pixel.y * width] = max_curvature;
-            g_array_append_val (max_positions, max_curvature_pixel);
+            if (max_curvature > 0.0)
+              {
+                curvatures[(gint) max_curvature_pixel.x + (gint) max_curvature_pixel.y * width] = 
max_curvature;
+                g_array_append_val (max_positions, max_curvature_pixel);
+              }
           }
       }
   g_queue_free_full (q, g_free);


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