From cdc57a7f58ae96e04305222eec11666b661a8b76 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 12 Sep 2022 14:46:35 +0200 Subject: [PATCH] [Multiplayer] Fix crash in spawner get_spawnable_scene. --- modules/multiplayer/multiplayer_spawner.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/multiplayer/multiplayer_spawner.cpp b/modules/multiplayer/multiplayer_spawner.cpp index 6f60318b3b75..9d0864e4d55c 100644 --- a/modules/multiplayer/multiplayer_spawner.cpp +++ b/modules/multiplayer/multiplayer_spawner.cpp @@ -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() {