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,11 +107,13 @@ class HashMapIterator: public Thread::Protector {
void find() { void find() {
object array = hashMapArray(t, map); object array = hashMapArray(t, map);
for (unsigned i = index; i < arrayLength(t, array); ++i) { if (array) {
if (arrayBody(t, array, i)) { for (unsigned i = index; i < arrayLength(t, array); ++i) {
node = arrayBody(t, array, i); if (arrayBody(t, array, i)) {
index = i + 1; node = arrayBody(t, array, i);
return; index = i + 1;
return;
}
} }
} }
node = 0; node = 0;