Merge pull request #15994 from brainsick/path2d-curve-defense
defend Path2D against a null curve
This commit is contained in:
commit
19548753f1
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@
|
|||
|
||||
Rect2 Path2D::_edit_get_rect() const {
|
||||
|
||||
if (curve->get_point_count() == 0)
|
||||
if (!curve.is_valid() || curve->get_point_count() == 0)
|
||||
return Rect2(0, 0, 0, 0);
|
||||
|
||||
Rect2 aabb = Rect2(curve->get_point_position(0), Vector2(0, 0));
|
||||
|
|
Loading…
Reference in a new issue