From f435a6f0b63499021cb71182ddd9abd312553854 Mon Sep 17 00:00:00 2001 From: qarmin Date: Sat, 5 Oct 2019 11:37:38 +0200 Subject: [PATCH] Fix crash in TileMap::fix_invalid_tiles --- scene/2d/tile_map.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 2bfdfd7d021..c9ba51bafb7 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -1050,6 +1050,7 @@ void TileMap::update_dirty_bitmask() { void TileMap::fix_invalid_tiles() { + ERR_FAIL_COND_MSG(tile_set.is_null(), "Cannot fix invalid tiles if Tileset is not open."); for (Map::Element *E = tile_map.front(); E; E = E->next()) { if (!tile_set->has_tile(get_cell(E->key().x, E->key().y))) {