- handle cases of empty state labels in ZScript.

Sadly this cannot print a full error message because it got no context for it when it is detected.
This commit is contained in:
Christoph Oelckers 2022-04-15 22:24:34 +02:00
commit e7f78ce911
2 changed files with 7 additions and 4 deletions

View file

@ -4767,10 +4767,7 @@ AActor *P_LineAttack(AActor *t1, DAngle angle, double distance,
PClassActor *type = PClass::FindActor(pufftype);
if (type == NULL)
{
if (victim != NULL)
{
memset(victim, 0, sizeof(*victim));
}
if (victim != NULL) *victim = {};
Printf("Attempt to spawn unknown actor type '%s'\n", pufftype.GetChars());
return NULL;
}