diff options
Diffstat (limited to 'scene/2d/path_2d.cpp')
-rw-r--r-- | scene/2d/path_2d.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index 658b998d17..4276918f53 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -30,7 +30,7 @@ #include "path_2d.h" -#include "engine.h" +#include "core/engine.h" #include "scene/scene_string_names.h" #ifdef TOOLS_ENABLED @@ -63,6 +63,10 @@ bool Path2D::_edit_use_rect() const { bool Path2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const { + if (curve.is_null()) { + return false; + } + for (int i = 0; i < curve->get_point_count(); i++) { Vector2 s[2]; s[0] = curve->get_point_position(i); |