[Bf-blender-cvs] [6c6a5a72c29] blender-v2.91-release: GPencil: Fix unreported assert when use select Box in single point strokes
Antonio Vazquez
noreply at git.blender.org
Sat Nov 21 14:17:35 CET 2020
Commit: 6c6a5a72c2978f7fcd57c419458309ae38fd36d8
Author: Antonio Vazquez
Date: Sat Nov 21 14:17:26 2020 +0100
Branches: blender-v2.91-release
https://developer.blender.org/rB6c6a5a72c2978f7fcd57c419458309ae38fd36d8
GPencil: Fix unreported assert when use select Box in single point strokes
The assert was when use segment selection mode.
===================================================================
M source/blender/editors/gpencil/gpencil_utils.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 28a90a26a9d..e02da8ebc8a 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -2337,6 +2337,9 @@ int ED_gpencil_select_stroke_segment(bGPDlayer *gpl,
float r_hita[3],
float r_hitb[3])
{
+ if (gps->totpoints < 2) {
+ return 0;
+ }
const float min_factor = 0.0015f;
bGPDspoint *pta1 = NULL;
bGPDspoint *pta2 = NULL;
More information about the Bf-blender-cvs
mailing list