mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Core: Integrate Ref::instantiate where possible
This commit is contained in:
parent
0f5f3bc954
commit
925b690c98
44 changed files with 81 additions and 81 deletions
|
|
@ -38,8 +38,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue