diff options
author | karroffel <therzog@mail.de> | 2017-12-05 20:00:44 +0100 |
---|---|---|
committer | karroffel <therzog@mail.de> | 2017-12-05 20:00:44 +0100 |
commit | 2ba4edbfb702f526c6f0109c683b0141d87c6423 (patch) | |
tree | 48165f0ca543f0612e8c2694dbbab327abf407be /core/dictionary.cpp | |
parent | 1587f45c2551a43db2808f2c5938095e19f060d2 (diff) | |
download | redot-engine-2ba4edbfb702f526c6f0109c683b0141d87c6423.tar.gz |
fix Dictionary iteration
Diffstat (limited to 'core/dictionary.cpp')
-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); |