mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +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
|
||||
{
|
||||
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",
|
||||
sc.String, type, name.GetChars());
|
||||
info = NULL;
|
||||
}
|
||||
else if (info == NULL)
|
||||
{
|
||||
Printf ("Unknown actor %s in %s %s\n",
|
||||
sc.String, type, name.GetChars());
|
||||
}
|
||||
}
|
||||
SET_FIELD (const PClass *, info);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue