- 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
parent f3ae61a2d3
commit 23f2a3a7fc

View file

@ -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);
}