# HG changeset patch # User Adam Kaminski # Date 1615155137 18000 # Sun Mar 07 17:12:17 2021 -0500 # Node ID 5ee68cb9af7891d27fd0ae9372491b68ee6a8f6e # Parent c84af20d7bd45e3f40b6c80c9e7c8ec61cd44d65 Added a sanity check to A_SetTics. diff -r c84af20d7bd4 -r 5ee68cb9af78 src/thingdef/thingdef_codeptr.cpp --- a/src/thingdef/thingdef_codeptr.cpp Sun Mar 07 17:10:27 2021 -0500 +++ b/src/thingdef/thingdef_codeptr.cpp Sun Mar 07 17:12:17 2021 -0500 @@ -5970,7 +5970,8 @@ ACTION_PARAM_START(1); ACTION_PARAM_INT(tics_to_set, 0); - if (stateowner != self && self->player != NULL && stateowner->IsKindOf(RUNTIME_CLASS(AWeapon))) + // [AK] Added a sanity check to make sure stateowner isn't NULL. + if (stateowner != NULL && stateowner != self && self->player != NULL && stateowner->IsKindOf(RUNTIME_CLASS(AWeapon))) { // Is this a weapon? Need to check psp states for a match, then. Blah. for (int i = 0; i < NUMPSPRITES; ++i) {