diff --git a/src/g_game.cpp b/src/g_game.cpp index 091065b0a..7ca8b2b35 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -1575,6 +1575,11 @@ void G_DeathMatchSpawnPlayer (int playernum) // FPlayerStart *G_PickPlayerStart(int playernum, int flags) { + if (AllPlayerStarts.Size() == 0) // No starts to pick + { + return NULL; + } + if ((level.flags2 & LEVEL2_RANDOMPLAYERSTARTS) || (flags & PPS_FORCERANDOM) || playerstarts[playernum].type == 0) { diff --git a/src/g_level.cpp b/src/g_level.cpp index 6ec7f9958..d799cc893 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -1209,8 +1209,8 @@ void G_FinishTravel () assert (pawn != pawndup); if (pawndup == NULL) { // Oh no! there was no start for this player! - start = G_PickPlayerStart(pnum, PPS_FORCERANDOM); - pawndup = P_SpawnPlayer(start, pnum, (level.flags2 & LEVEL2_PRERAISEWEAPON) ? SPF_WEAPONFULLYUP : 0); + start = G_PickPlayerStart(pnum, PPS_FORCERANDOM); + if (start != NULL) pawndup = P_SpawnPlayer(start, pnum, (level.flags2 & LEVEL2_PRERAISEWEAPON) ? SPF_WEAPONFULLYUP : 0); if (pawndup == NULL) { pawn->flags |= MF_NOSECTOR | MF_NOBLOCKMAP;