From b95ebbda75fe25d0813f0530a8a8d04449bc633a Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 17 Aug 2021 12:30:57 +0200 Subject: [PATCH] Fail if tiled_wall_data is not valid, and also copy the new tiling type property. --- tiled_wall/tiled_wall_data.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tiled_wall/tiled_wall_data.cpp b/tiled_wall/tiled_wall_data.cpp index 41fe9a1..cb38456 100644 --- a/tiled_wall/tiled_wall_data.cpp +++ b/tiled_wall/tiled_wall_data.cpp @@ -149,6 +149,10 @@ void TiledWallData::add_textures_into(Ref texture_packer) { #endif void TiledWallData::copy_from(const Ref &tiled_wall_data) { + ERR_FAIL_COND(!tiled_wall_data.is_valid()); + + _tiling_type = tiled_wall_data->_tiling_type; + _textures.clear(); for (int i = 0; i < tiled_wall_data->_textures.size(); ++i) {