Fail if tiled_wall_data is not valid, and also copy the new tiling type property.

This commit is contained in:
Relintai 2021-08-17 12:30:57 +02:00
parent b057e8d9af
commit b95ebbda75

View File

@ -149,6 +149,10 @@ void TiledWallData::add_textures_into(Ref<TexturePacker> texture_packer) {
#endif
void TiledWallData::copy_from(const Ref<TiledWallData> &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) {