mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 09:22:43 +00:00
plist updates; PL_GetPropertyList now calls Sys_Error() on plist errors.
This commit is contained in:
parent
22878209d6
commit
76385372f3
1 changed files with 10 additions and 1 deletions
|
@ -469,6 +469,7 @@ plitem_t *
|
|||
PL_GetPropertyList (const char *string)
|
||||
{
|
||||
pldata_t *pl = calloc (1, sizeof (pldata_t));
|
||||
plitem_t *newpl = NULL;
|
||||
|
||||
pl->ptr = string;
|
||||
pl->pos = 0;
|
||||
|
@ -476,5 +477,13 @@ PL_GetPropertyList (const char *string)
|
|||
pl->error = NULL;
|
||||
pl->line = 1;
|
||||
|
||||
return PL_ParsePropertyListItem (pl);
|
||||
if (newpl = PL_ParsePropertyListItem (pl)) {
|
||||
free (pl);
|
||||
return newpl;
|
||||
} else {
|
||||
if (pl && pl->error && pl->error[0])
|
||||
Sys_Error ("%s\n", pl->error);
|
||||
free (pl);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue