Merge pull request #20413 from mhilbrunner/tilemap-crash-fix

Tilemap editor: Fix crash introduced in #17582
This commit is contained in:
Max Hilbrunner 2018-07-24 17:45:10 +02:00 committed by GitHub
commit eb38a61a6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -526,7 +526,7 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era
if (!erase) {
ids = get_selected_tiles();
if (ids.size() == 0 && ids[0] == TileMap::INVALID_CELL)
if (ids.size() == 0 || ids[0] == TileMap::INVALID_CELL)
return PoolVector<Vector2>();
} else if (prev_id == TileMap::INVALID_CELL) {
return PoolVector<Vector2>();