diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-10-05 11:54:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-05 11:54:37 +0200 |
commit | 0a4065e5146e172896c25151a1acdc9b4a7f684e (patch) | |
tree | 5fa4965827c75befdb1ae9546ff72855892416b8 /scene | |
parent | 872af14e6f9232897aeb6349ef151687a1a3e00c (diff) | |
parent | f435a6f0b63499021cb71182ddd9abd312553854 (diff) |
Merge pull request #32563 from qarmin/fix_tileset_crash
Fix crash in TileMap::fix_invalid_tiles
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/tile_map.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 2bfdfd7d02..c9ba51bafb 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<PosKey, Cell>::Element *E = tile_map.front(); E; E = E->next()) { if (!tile_set->has_tile(get_cell(E->key().x, E->key().y))) { |