mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 21:51:09 +00:00
No more crashing in anonymous functions during runtime check of virtualscope
This commit is contained in:
parent
fb9b8c8870
commit
6ec7d9af59
1 changed files with 2 additions and 1 deletions
|
@ -107,7 +107,8 @@ void FScopeBarrier_ValidateNew(PClass* cls, PFunction* callingfunc)
|
|||
// this can be imported in vmexec.h
|
||||
void FScopeBarrier_ValidateCall(PFunction* calledfunc, PFunction* callingfunc, PClass* selftype)
|
||||
{
|
||||
int outerside = FScopeBarrier::SideFromFlags(callingfunc->Variants[0].Flags);
|
||||
// [ZZ] anonymous blocks have 0 variants, so give them Side_Virtual.
|
||||
int outerside = callingfunc->Variants.Size() ? FScopeBarrier::SideFromFlags(callingfunc->Variants[0].Flags) : FScopeBarrier::Side_Virtual;
|
||||
if (outerside == FScopeBarrier::Side_Virtual)
|
||||
outerside = FScopeBarrier::SideFromObjectFlags(callingfunc->OwningClass->ObjectFlags);
|
||||
int innerside = FScopeBarrier::SideFromFlags(calledfunc->Variants[0].Flags);
|
||||
|
|
Loading…
Reference in a new issue