mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 12:43:43 +00:00
Merge pull request #32563 from qarmin/fix_tileset_crash
Fix crash in TileMap::fix_invalid_tiles
This commit is contained in:
commit
0a4065e514
@ -1050,6 +1050,7 @@ void TileMap::update_dirty_bitmask() {
|
|||||||
|
|
||||||
void TileMap::fix_invalid_tiles() {
|
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()) {
|
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))) {
|
if (!tile_set->has_tile(get_cell(E->key().x, E->key().y))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user