UI: Fix crash when region becomes too thin

This commit is contained in:
Jacques Lucke 2019-05-03 17:42:45 +02:00
parent 6ab7b38464
commit 712fe561d5
Notes: blender-bot 2023-02-14 09:17:57 +01:00
Referenced by issue #64325, NURBS curves cease NURBS behavior when reduced to one or two verticies, and never regain it.
1 changed files with 6 additions and 0 deletions

View File

@ -153,6 +153,12 @@ static void get_parallel_lines_draw_steps(const ParallelLinesSet *lines,
float *r_first,
uint *r_steps)
{
if (region_start >= region_end) {
*r_first = 0;
*r_steps = 0;
return;
}
BLI_assert(lines->distance > 0);
BLI_assert(region_start <= region_end);