diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-11-21 16:17:26 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-11-21 16:17:26 +0300 |
commit | 6c6a5a72c2978f7fcd57c419458309ae38fd36d8 (patch) | |
tree | 0ec54c7089cbb7ec63159a0c5b6ff33c5c0e5055 /source | |
parent | dca36a8ec922bcce6bc4882cd6cba52792ed56ee (diff) |
GPencil: Fix unreported assert when use select Box in single point strokes
The assert was when use segment selection mode.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 3 |
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; |