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:
-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;