From 8a22d4cd442481853228a56e38487247821258b9 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Sat, 10 Dec 2022 13:09:20 +0800 Subject: Fix !tile_set.is_valid() error on startup --- editor/plugins/tiles/tile_set_editor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'editor/plugins') diff --git a/editor/plugins/tiles/tile_set_editor.cpp b/editor/plugins/tiles/tile_set_editor.cpp index 934de05cfb..e8ceacf8f8 100644 --- a/editor/plugins/tiles/tile_set_editor.cpp +++ b/editor/plugins/tiles/tile_set_editor.cpp @@ -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) { - ERR_FAIL_COND(!tile_set.is_valid()); + if (tile_set.is_null()) { + return; + } // Get the previously selected id. int old_selected = TileSet::INVALID_SOURCE; -- cgit v1.2.3