diff --git a/src/g_strife/a_strifeitems.cpp b/src/g_strife/a_strifeitems.cpp index 45e8218e1..26ac88393 100644 --- a/src/g_strife/a_strifeitems.cpp +++ b/src/g_strife/a_strifeitems.cpp @@ -188,10 +188,13 @@ bool ARaiseAlarm::TryPickup (AActor *&toucher) bool ARaiseAlarm::SpecialDropAction (AActor *dropper) { - P_NoiseAlert (dropper->target, dropper->target); - if (dropper->target->CheckLocalView (consoleplayer)) + if (dropper->target != nullptr) { - Printf ("You Fool! You've set off the alarm.\n"); + P_NoiseAlert(dropper->target, dropper->target); + if (dropper->target->CheckLocalView(consoleplayer)) + { + Printf("You Fool! You've set off the alarm.\n"); + } } Destroy (); return true; @@ -237,11 +240,14 @@ bool ACloseDoor222::TryPickup (AActor *&toucher) bool ACloseDoor222::SpecialDropAction (AActor *dropper) { EV_DoDoor (DDoor::doorClose, NULL, dropper, 222, 2., 0, 0, 0); - if (dropper->target->CheckLocalView (consoleplayer)) + if (dropper->target != nullptr) { - Printf ("You're dead! You set off the alarm.\n"); + if (dropper->target->CheckLocalView(consoleplayer)) + { + Printf("You're dead! You set off the alarm.\n"); + } + P_NoiseAlert(dropper->target, dropper->target); } - P_NoiseAlert (dropper->target, dropper->target); Destroy (); return true; }