diff options
Diffstat (limited to 'libcutils/hashmap.c')
-rw-r--r-- | libcutils/hashmap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcutils/hashmap.c b/libcutils/hashmap.c index e29bc24..65539ea 100644 --- a/libcutils/hashmap.c +++ b/libcutils/hashmap.c @@ -310,10 +310,11 @@ void hashmapForEach(Hashmap* map, for (i = 0; i < map->bucketCount; i++) { Entry* entry = map->buckets[i]; while (entry != NULL) { + Entry *next = entry->next; if (!callback(entry->key, entry->value, context)) { return; } - entry = entry->next; + entry = next; } } } |