diff --git a/src/r_main.cpp b/src/r_main.cpp index f80181fc4..8adb6ab5e 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -1438,7 +1438,13 @@ boolean R_ViewpointHasChasecam(player_t *player) boolean R_IsViewpointThirdPerson(player_t *player, boolean skybox) { - boolean chasecam = R_ViewpointHasChasecam(player); + boolean chasecam = false; + + // Prevent game crash if player is ever invalid. + if (!player) + return false; + + chasecam = R_ViewpointHasChasecam(player); // cut-away view stuff if (player->awayviewtics || skybox) diff --git a/src/st_stuff.c b/src/st_stuff.c index c9e9777b8..d108a1c9c 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -918,10 +918,7 @@ void ST_Drawer(void) stplyr = &players[displayplayers[i]]; stplyrnum = i; R_SetViewContext(VIEWCONTEXT_PLAYER1 + i); - - // HACK: This can possibly crash the game in R_IsViewpointThirdPerson during first two tics if the player object doesn't exist. - if (stplyr->mo) - R_InterpolateView(rendertimefrac); // to assist with object tracking + R_InterpolateView(rendertimefrac); // to assist with object tracking ST_overlayDrawer(); }