From 3eaebabdf114c4ae9d6d8590e4e8681692af704d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 6 Oct 2014 17:40:02 +0200 Subject: [PATCH] - fixed: EV_Teleport must not access the thing's player pointer before ensuring that 'thing' is a valid pointer. --- src/p_teleport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_teleport.cpp b/src/p_teleport.cpp index b64c04a5ae..60308d8ed7 100644 --- a/src/p_teleport.cpp +++ b/src/p_teleport.cpp @@ -328,7 +328,6 @@ static AActor *SelectTeleDest (int tid, int tag, bool norandom) bool EV_Teleport (int tid, int tag, line_t *line, int side, AActor *thing, bool fog, bool sourceFog, bool keepOrientation, bool haltVelocity, bool keepHeight) { - bool predicting = (thing->player && (thing->player->cheats & CF_PREDICTING)); AActor *searcher; fixed_t z; @@ -341,6 +340,7 @@ bool EV_Teleport (int tid, int tag, line_t *line, int side, AActor *thing, bool { // Teleport function called with an invalid actor return false; } + bool predicting = (thing->player && (thing->player->cheats & CF_PREDICTING)); if (thing->flags2 & MF2_NOTELEPORT) { return false;