mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
- fixed: When a bogus class is deleted from AllActorClasses, the entry should also be removed from the array instead of leaving a null pointer behind.
This commit is contained in:
parent
07c110d5f7
commit
0233c21e33
1 changed files with 3 additions and 1 deletions
|
@ -387,8 +387,9 @@ void LoadActors ()
|
|||
}
|
||||
FScriptPosition::ResetErrorCounter();
|
||||
|
||||
for (auto ti : PClassActor::AllActorClasses)
|
||||
for (int i = PClassActor::AllActorClasses.Size()-1; i>=0;i--)
|
||||
{
|
||||
auto ti = PClassActor::AllActorClasses[i];
|
||||
if (ti->Size == TentativeClass)
|
||||
{
|
||||
if (ti->ObjectFlags & OF_Transient)
|
||||
|
@ -400,6 +401,7 @@ void LoadActors ()
|
|||
{
|
||||
if (*op == ti) *op = nullptr;
|
||||
}
|
||||
PClassActor::AllActorClasses.Delete(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue