Skip to content

Commit

Permalink
Merge pull request #56643 from AnilBK/path2D-check-point-count
Browse files Browse the repository at this point in the history
Path2D: Check points count before rendering.
  • Loading branch information
akien-mga authored Jan 9, 2022
2 parents 5a61822 + b770a4d commit b6b81e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scene/2d/path_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ void Path2D::_notification(int p_what) {
return;
}

if (curve->get_point_count() < 2) {
return;
}

#ifdef TOOLS_ENABLED
const real_t line_width = 2 * EDSCALE;
#else
Expand Down

0 comments on commit b6b81e8

Please sign in to comment.