check for null array in HashMapIterator::find

This commit is contained in:
Joel Dice 2008-12-18 20:23:08 -07:00
parent 21df2e9153
commit bd89b8e00a

View File

@ -107,6 +107,7 @@ class HashMapIterator: public Thread::Protector {
void find() {
object array = hashMapArray(t, map);
if (array) {
for (unsigned i = index; i < arrayLength(t, array); ++i) {
if (arrayBody(t, array, i)) {
node = arrayBody(t, array, i);
@ -114,6 +115,7 @@ class HashMapIterator: public Thread::Protector {
return;
}
}
}
node = 0;
}