GPencil: Fix unreported assert when use select Box in single point strokes

The assert was when use segment selection mode.
This commit is contained in:
Antonio Vazquez 2020-11-21 14:17:26 +01:00
parent dca36a8ec9
commit 6c6a5a72c2
Notes: blender-bot 2023-02-14 03:21:27 +01:00
Referenced by issue #82963, Grease Pencil regression in tram file
1 changed files with 3 additions and 0 deletions

View File

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