diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 7155c98e64..62118bd3f8 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -4564,13 +4564,13 @@ bool GetVarAddrType(AActor *self, FName varname, int index, void *&addr, PType * { PField *var = dyn_cast(self->GetClass()->Symbols.FindSymbol(varname, true)); PArray *arraytype; - BYTE *baddr = reinterpret_cast(self) + var->Offset; if (var == NULL || (var->Flags & VARF_Native)) { return false; } type = var->Type; + BYTE *baddr = reinterpret_cast(self) + var->Offset; arraytype = dyn_cast(type); if (arraytype != NULL) {