From f74d52e80deb4a3ae6b46d4a1c7dd32d19bbfd54 Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 19 Jan 2022 00:39:26 +0100 Subject: Fix error on scene tiles cleanup --- scene/2d/tile_map.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 62dc4d1c15..5857b6710f 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -1809,7 +1809,7 @@ void TileMap::_scenes_update_dirty_quadrants(SelfList::List &r_ // Clear the scenes. for (const KeyValue &E : q.scenes) { - Node *node = get_node(E.value); + Node *node = get_node_or_null(E.value); if (node) { node->queue_delete(); } @@ -1857,7 +1857,7 @@ void TileMap::_scenes_update_dirty_quadrants(SelfList::List &r_ void TileMap::_scenes_cleanup_quadrant(TileMapQuadrant *p_quadrant) { // Clear the scenes. for (const KeyValue &E : p_quadrant->scenes) { - Node *node = get_node(E.value); + Node *node = get_node_or_null(E.value); if (node) { node->queue_delete(); } -- cgit v1.2.3