diff --git a/src/dict.c b/src/dict.c index 3e01092141509077417fcf5584cff68d47265caf..d3b83d52d27e2e48e17eaa3ef6d532da46422b9f 100644 --- a/src/dict.c +++ b/src/dict.c @@ -754,6 +754,8 @@ unsigned long dictScan(dict *d, unsigned long s0, s1; unsigned long m0, m1; + if (dictSize(d) == 0) return 0; + if (!dictIsRehashing(d)) { t0 = &(d->ht[0]); m0 = t0->sizemask;