mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
fixed double allocation of metadata.
This commit is contained in:
parent
168627f549
commit
5f6da0d222
1 changed files with 1 additions and 1 deletions
|
@ -3361,7 +3361,7 @@ PField *PClass::AddField(FName name, PType *type, DWORD flags)
|
|||
// Only initialize the defaults if they have already been created.
|
||||
// For ZScript this is not the case, it will first define all fields before
|
||||
// setting up any defaults for any class.
|
||||
if (field != nullptr && !(flags & VARF_Native))
|
||||
if (field != nullptr && !(flags & VARF_Native) && Meta != nullptr)
|
||||
{
|
||||
Meta = (BYTE *)M_Realloc(Meta, MetaSize);
|
||||
memset(Meta + oldsize, 0, MetaSize - oldsize);
|
||||
|
|
Loading…
Reference in a new issue