fix Dictionary iteration

This commit is contained in:
karroffel 2017-12-05 20:00:44 +01:00
parent 1587f45c25
commit 2ba4edbfb7

View File

@ -204,7 +204,9 @@ const Variant *Dictionary::next(const Variant *p_key) const {
if (p_key == NULL) {
// caller wants to get the first element
return &_p->variant_map.front().key();
if (_p->variant_map.front())
return &_p->variant_map.front().key();
return NULL;
}
OrderedHashMap<Variant, Variant, _DictionaryVariantHash>::Element E = _p->variant_map.find(*p_key);