Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-11-21 16:17:26 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-11-21 16:17:26 +0300
commit6c6a5a72c2978f7fcd57c419458309ae38fd36d8 (patch)
tree0ec54c7089cbb7ec63159a0c5b6ff33c5c0e5055
parentdca36a8ec922bcce6bc4882cd6cba52792ed56ee (diff)
GPencil: Fix unreported assert when use select Box in single point strokes
The assert was when use segment selection mode.
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c3
1 files changed, 3 insertions, 0 deletions
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;