summaryrefslogtreecommitdiffstats
path: root/editor/plugins/navigation_polygon_editor_plugin.cpp
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-11-12 13:46:08 -0500
committerSpartan322 <Megacake1234@gmail.com>2024-11-12 13:46:59 -0500
commit3a73c6ebd18bff0fa125be58d3ac9c7a63bab61d (patch)
treec7341bd56c977259578b127886c9a88eeef11820 /editor/plugins/navigation_polygon_editor_plugin.cpp
parent5094c2a5f7d506b0e685120f14d1df42e1e9d495 (diff)
parentcb411fa960f0b7fdbd97dcdb4c90f9346360ee0e (diff)
downloadredot-engine-3a73c6ebd18bff0fa125be58d3ac9c7a63bab61d.tar.gz
Merge commit godotengine/godot@cb411fa960f0b7fdbd97dcdb4c90f9346360ee0e
Diffstat (limited to 'editor/plugins/navigation_polygon_editor_plugin.cpp')
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index b2b5a953ad..066ec76085 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -40,8 +40,8 @@
Ref<NavigationPolygon> NavigationPolygonEditor::_ensure_navpoly() const {
Ref<NavigationPolygon> navpoly = node->get_navigation_polygon();
- if (!navpoly.is_valid()) {
- navpoly = Ref<NavigationPolygon>(memnew(NavigationPolygon));
+ if (navpoly.is_null()) {
+ navpoly.instantiate();
node->set_navigation_polygon(navpoly);
}
return navpoly;