Fixed extraneous errors related to accessing nested props (bug 5446, r=me).

This commit is contained in:
Asher Baker 2012-09-04 11:41:35 +01:00
parent 9bcc3de922
commit d839b83b6b

View File

@ -352,11 +352,16 @@ typedescription_t *UTIL_FindInDataMap(datamap_t *pMap, const char *name, bool *i
{ {
if (isNested) if (isNested)
{ {
*isNested = true; *isNested = (UTIL_FindInDataMap(pMap->dataDesc[i].td, name, NULL) != NULL);
return NULL; if (*isNested)
{
return NULL;
} else {
continue;
}
} else { // Use the old behaviour, we dont want to spring this on extensions - even if they're doing bad things. } else { // Use the old behaviour, we dont want to spring this on extensions - even if they're doing bad things.
typedescription_t *_td; typedescription_t *_td;
if ((_td=UTIL_FindInDataMap(pMap->dataDesc[i].td, name, isNested)) != NULL) if ((_td=UTIL_FindInDataMap(pMap->dataDesc[i].td, name, NULL)) != NULL)
{ {
return _td; return _td;
} }