From 6c6a5a72c2978f7fcd57c419458309ae38fd36d8 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Sat, 21 Nov 2020 14:17:26 +0100 Subject: GPencil: Fix unreported assert when use select Box in single point strokes The assert was when use segment selection mode. --- source/blender/editors/gpencil/gpencil_utils.c | 3 +++ 1 file changed, 3 insertions(+) (limited to '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; -- cgit v1.2.3