mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue