From 53f87f7e41aa8f5dbe8639253ede44542086f046 Mon Sep 17 00:00:00 2001 From: MadCamel Date: Sun, 23 Aug 2009 03:40:12 -0400 Subject: Fixed crash on empty storage --- src/common/db.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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;iht[i])==NULL) -- cgit v1.2.3-70-g09d2