diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-12-07 00:22:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-07 00:22:38 +0100 |
commit | a88543c88173a5cbdd2566d9d09acc13e38a7922 (patch) | |
tree | e98717c17290ce6c9e57c8fe620dfc02b6ea832c | |
parent | 8b907365d063f9376f644c0a51eb173ebf7b86ce (diff) | |
parent | 2ba4edbfb702f526c6f0109c683b0141d87c6423 (diff) |
Merge pull request #14003 from karroffel/dictionary-iterate-fix
fix Dictionary iteration
-rw-r--r-- | core/dictionary.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/dictionary.cpp b/core/dictionary.cpp index 48e65c734f..44fce2474f 100644 --- a/core/dictionary.cpp +++ b/core/dictionary.cpp @@ -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); |