Merge pull request #69842 from timothyqiu/tile-set-update

Fix !tile_set.is_valid() error on startup
This commit is contained in:
Rémi Verschelde 2022-12-10 10:45:52 +01:00 committed by GitHub
commit cc5d2c68a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,7 +120,9 @@ bool TileSetEditor::_can_drop_data_fw(const Point2 &p_point, const Variant &p_da
} }
void TileSetEditor::_update_sources_list(int force_selected_id) { void TileSetEditor::_update_sources_list(int force_selected_id) {
ERR_FAIL_COND(!tile_set.is_valid()); if (tile_set.is_null()) {
return;
}
// Get the previously selected id. // Get the previously selected id.
int old_selected = TileSet::INVALID_SOURCE; int old_selected = TileSet::INVALID_SOURCE;