mirror of https://github.com/ZDoom/gzdoom-gles.git
- 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
|
@ -387,8 +387,9 @@ void LoadActors ()
|
||||||
}
|
}
|
||||||
FScriptPosition::ResetErrorCounter();
|
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->Size == TentativeClass)
|
||||||
{
|
{
|
||||||
if (ti->ObjectFlags & OF_Transient)
|
if (ti->ObjectFlags & OF_Transient)
|
||||||
|
@ -400,6 +401,7 @@ void LoadActors ()
|
||||||
{
|
{
|
||||||
if (*op == ti) *op = nullptr;
|
if (*op == ti) *op = nullptr;
|
||||||
}
|
}
|
||||||
|
PClassActor::AllActorClasses.Delete(i);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue