From 23f2a3a7fcc0f413cbf7844ce6553cb4fe607225 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 27 Dec 2018 13:01:42 +0200 Subject: [PATCH] - fixed crash in Actor.Warp() with null destination https://forum.zdoom.org/viewtopic.php?t=63031 --- src/p_things.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/p_things.cpp b/src/p_things.cpp index 9728c691e..203230845 100644 --- a/src/p_things.cpp +++ b/src/p_things.cpp @@ -993,5 +993,7 @@ DEFINE_ACTION_FUNCTION(AActor, Warp) PARAM_FLOAT(radiusoffset) PARAM_ANGLE(pitch) - ACTION_RETURN_INT(!!P_Thing_Warp(self, destination, xofs, yofs, zofs, angle, flags, heightoffset, radiusoffset, pitch)); + const int result = destination == nullptr ? 0 : + P_Thing_Warp(self, destination, xofs, yofs, zofs, angle, flags, heightoffset, radiusoffset, pitch); + ACTION_RETURN_INT(result); }