Skip to content

Commit

Permalink
fix: prevent spawn scene that was removed while it was loading
Browse files Browse the repository at this point in the history
  • Loading branch information
kuruk-mm committed Nov 24, 2023
1 parent 9fd892d commit 052c7e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions godot/src/logic/scene_fetcher.gd
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ func async_load_scene(scene_entity_id: String, entity: Dictionary):
)
return false

# the scene was removed while it was loading...
if not loaded_scenes.has(scene_entity_id):
return false

if is_sdk7:
_on_try_spawn_scene(
loaded_scenes[scene_entity_id], local_main_js_path, local_main_crdt_path
Expand Down

0 comments on commit 052c7e5

Please sign in to comment.