فهرست منبع

Path2D: Check points count before rendering.

Anilforextra 3 سال پیش
والد
کامیت
b770a4d0ac
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      scene/2d/path_2d.cpp

+ 4 - 0
scene/2d/path_2d.cpp

@@ -93,6 +93,10 @@ void Path2D::_notification(int p_what) {
 			return;
 			return;
 		}
 		}
 
 
+		if (curve->get_point_count() < 2) {
+			return;
+		}
+
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 		const real_t line_width = 2 * EDSCALE;
 		const real_t line_width = 2 * EDSCALE;
 #else
 #else