ソースを参照

defend Path2D against a null curve

Todd Ross 7 年 前
コミット
fd6a98b753
1 ファイル変更1 行追加1 行削除
  1. 1 1
      scene/2d/path_2d.cpp

+ 1 - 1
scene/2d/path_2d.cpp

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