free entities that didn't get initialized (lost this in the format conversion)

This commit is contained in:
Bill Currie 2007-03-25 04:15:18 +00:00 committed by Jeff Teunissen
parent d5f886c334
commit c20a553e1a

View file

@ -372,6 +372,7 @@ ED_InitEntity (progs_t *pr, plitem_t *entity, edict_t *ent)
const char *field_name;
const char *value;
int count;
int init = 0;
keys = PL_D_AllKeys (entity);
count = PL_A_NumObjects (keys);
@ -389,8 +390,11 @@ ED_InitEntity (progs_t *pr, plitem_t *entity, edict_t *ent)
if (!ED_ParseEpair (pr, ent->v, field, value))
PR_Error (pr, "ED_InitEntity: parse error");
}
init = 1;
}
PL_Free (keys);
if (!init)
ent->free = 1;
}
static void