Added a NULL check for activator in Warp().

This commit is contained in:
Blue-Shadow 2016-03-14 20:52:44 +03:00
parent d07bf08e56
commit a07f264782

View file

@ -5946,8 +5946,8 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
reference = SingleActorFromTID(tid_dest, activator); reference = SingleActorFromTID(tid_dest, activator);
} }
// If there is no actor to warp to, fail. // If there is no activator or actor to warp to, fail.
if (!reference) if (activator == NULL || !reference)
return false; return false;
if (P_Thing_Warp(activator, reference, xofs, yofs, zofs, angle, flags, heightoffset, radiusoffset, pitch)) if (P_Thing_Warp(activator, reference, xofs, yofs, zofs, angle, flags, heightoffset, radiusoffset, pitch))