- fixed crash in Actor.Warp() with null destination

https://forum.zdoom.org/viewtopic.php?t=63031
This commit is contained in:
alexey.lysiuk 2018-12-27 13:01:42 +02:00 committed by drfrag
parent e4f5160f66
commit 33067deb86

View file

@ -1001,5 +1001,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);
}