mirror of https://github.com/ZDoom/qzdoom.git
Fixed crash when accessing undefined user variable
Presence of DECORATE user variable was not checked before attempting to read or write its value from ACS
This commit is contained in:
parent
b8f8daf1c1
commit
7b49d9d92c
|
@ -4564,13 +4564,13 @@ bool GetVarAddrType(AActor *self, FName varname, int index, void *&addr, PType *
|
|||
{
|
||||
PField *var = dyn_cast<PField>(self->GetClass()->Symbols.FindSymbol(varname, true));
|
||||
PArray *arraytype;
|
||||
BYTE *baddr = reinterpret_cast<BYTE *>(self) + var->Offset;
|
||||
|
||||
if (var == NULL || (var->Flags & VARF_Native))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
type = var->Type;
|
||||
BYTE *baddr = reinterpret_cast<BYTE *>(self) + var->Offset;
|
||||
arraytype = dyn_cast<PArray>(type);
|
||||
if (arraytype != NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue