diff options
Diffstat (limited to 'src/common/db.c')
-rw-r--r-- | src/common/db.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/db.c b/src/common/db.c index a2dc695..62d5732 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -434,6 +434,9 @@ void db_foreach(struct dbt *table,int (*func)(void*,void*,va_list),...) struct dbn *p,*pn,*stack[64]; va_list ap; + if (!table) + return; + va_start(ap,func); for(i=0;i<HASH_SIZE;i++){ if((p=table->ht[i])==NULL) |