From bb685147f9636112da4ee7e3a6e6dcbd739d8da4 Mon Sep 17 00:00:00 2001 From: qarmin Date: Tue, 8 Oct 2019 15:46:38 +0200 Subject: [PATCH] Fix crash in TileMap::update_cell_bitmask --- 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 c9ba51bafb..173214dfe4 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -955,6 +955,7 @@ void TileMap::update_bitmask_region(const Vector2 &p_start, const Vector2 &p_end void TileMap::update_cell_bitmask(int p_x, int p_y) { + ERR_FAIL_COND_MSG(tile_set.is_null(), "Cannot update cell bitmask if Tileset is not open."); PosKey p(p_x, p_y); Map::Element *E = tile_map.find(p); if (E != NULL) {