Merge pull request #65697 from Faless/mp/4.x_spawner_crash

[Multiplayer] Fix crash in spawner get_spawnable_scene.
This commit is contained in:
Fabio Alessandrelli 2022-09-12 15:34:35 +02:00 committed by GitHub
commit dbab737798
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,6 +101,7 @@ int MultiplayerSpawner::get_spawnable_scene_count() const {
return spawnable_scenes.size();
}
String MultiplayerSpawner::get_spawnable_scene(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, (int)spawnable_scenes.size(), "");
return spawnable_scenes[p_idx].path;
}
void MultiplayerSpawner::clear_spawnable_scenes() {