mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
Fix null pointer access in p_terrain.cpp
This commit is contained in:
parent
ee91cf77e4
commit
2e2fe87445
1 changed files with 6 additions and 6 deletions
|
@ -556,17 +556,17 @@ static void GenericParse (FScanner &sc, FGenericParse *parser, const char **keyw
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
info = PClass::FindClass (sc.String);
|
info = PClass::FindClass (sc.String);
|
||||||
if (!info->IsDescendantOf (RUNTIME_CLASS(AActor)))
|
if (info == NULL)
|
||||||
|
{
|
||||||
|
Printf ("Unknown actor %s in %s %s\n",
|
||||||
|
sc.String, type, name.GetChars());
|
||||||
|
}
|
||||||
|
else if (!info->IsDescendantOf (RUNTIME_CLASS(AActor)))
|
||||||
{
|
{
|
||||||
Printf ("%s is not an Actor (in %s %s)\n",
|
Printf ("%s is not an Actor (in %s %s)\n",
|
||||||
sc.String, type, name.GetChars());
|
sc.String, type, name.GetChars());
|
||||||
info = NULL;
|
info = NULL;
|
||||||
}
|
}
|
||||||
else if (info == NULL)
|
|
||||||
{
|
|
||||||
Printf ("Unknown actor %s in %s %s\n",
|
|
||||||
sc.String, type, name.GetChars());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
SET_FIELD (const PClass *, info);
|
SET_FIELD (const PClass *, info);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue