[Bf-blender-cvs] [2b8ed8281ed] temp-gpencil-fill: GPencil: Fix infinite loop for very small filling areas

Antonio Vazquez noreply at git.blender.org
Sat Feb 6 17:17:11 CET 2021


Commit: 2b8ed8281eda31ec8bb6be73d34a995e74646e69
Author: Antonio Vazquez
Date:   Sat Feb 6 17:17:05 2021 +0100
Branches: temp-gpencil-fill
https://developer.blender.org/rB2b8ed8281eda31ec8bb6be73d34a995e74646e69

GPencil: Fix infinite loop for very small filling areas

===================================================================

M	source/blender/editors/gpencil/gpencil_fill.c

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index ec113ab4919..8ae98ec0fc2 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -1964,6 +1964,11 @@ static bool gpencil_do_frame_fill(tGPDfill *tgpf, const bool is_inverted)
       /* Free memory. */
       MEM_SAFE_FREE(tgpf->sbuffer);
       MEM_SAFE_FREE(tgpf->depth_arr);
+
+      /* Limit very small areas. */
+      if (totpoints < 3) {
+        totpoints = 0;
+      }
     }
 
     /* Delete temp image. */



More information about the Bf-blender-cvs mailing list