mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
check for null array in HashMapIterator::find
This commit is contained in:
parent
21df2e9153
commit
bd89b8e00a
12
src/util.h
12
src/util.h
@ -107,11 +107,13 @@ class HashMapIterator: public Thread::Protector {
|
||||
|
||||
void find() {
|
||||
object array = hashMapArray(t, map);
|
||||
for (unsigned i = index; i < arrayLength(t, array); ++i) {
|
||||
if (arrayBody(t, array, i)) {
|
||||
node = arrayBody(t, array, i);
|
||||
index = i + 1;
|
||||
return;
|
||||
if (array) {
|
||||
for (unsigned i = index; i < arrayLength(t, array); ++i) {
|
||||
if (arrayBody(t, array, i)) {
|
||||
node = arrayBody(t, array, i);
|
||||
index = i + 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
node = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user