Fix error spam when typing in the TileMap editor's search box while having no results

(cherry picked from commit 412a0b73e9)
This commit is contained in:
Michael Alexsander Silva Dias 2019-06-04 01:44:38 -03:00 committed by Rémi Verschelde
parent ef6d414e6e
commit 1804a726b4
1 changed files with 1 additions and 1 deletions

View File

@ -472,7 +472,7 @@ void TileMapEditor::_update_palette() {
if (selected.get(0) != TileMap::INVALID_CELL) {
set_selected_tiles(selected);
sel_tile = selected.get(Math::rand() % selected.size());
} else {
} else if (palette->get_item_count() > 0) {
palette->select(0);
}