diff --git a/src/info.cpp b/src/info.cpp index dd87e85f60..4022e8b2ab 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -154,14 +154,18 @@ bool FState::CallAction(AActor *self, AActor *stateowner, FStateParamInfo *info, catch (CVMAbortException &err) { err.MaybePrintMessage(); - const char *callinfo = ""; - if (info != nullptr && info->mStateType == STATE_Psprite) + + if (stateowner != nullptr) { - if (stateowner->IsKindOf(NAME_Weapon) && stateowner != self) callinfo = "weapon "; - else callinfo = "overlay "; + const char *callinfo = ""; + if (info != nullptr && info->mStateType == STATE_Psprite) + { + if (stateowner->IsKindOf(NAME_Weapon) && stateowner != self) callinfo = "weapon "; + else callinfo = "overlay "; + } + err.stacktrace.AppendFormat("Called from %sstate %s in %s\n", callinfo, FState::StaticGetStateName(this).GetChars(), stateowner->GetClass()->TypeName.GetChars()); } - err.stacktrace.AppendFormat("Called from %sstate %s in %s\n", callinfo, FState::StaticGetStateName(this).GetChars(), stateowner->GetClass()->TypeName.GetChars()); - throw; + throw; }