diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2022-12-10 13:09:20 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2022-12-10 13:09:20 +0800 |
commit | 8a22d4cd442481853228a56e38487247821258b9 (patch) | |
tree | 58cc0eee80c7e2b8948f1a9c099cc181c99fdbbe /editor | |
parent | ae86d907e75c3de9b039e7cc77e521bc9739e6dc (diff) |
Fix !tile_set.is_valid() error on startup
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/tiles/tile_set_editor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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; |