aboutsummaryrefslogtreecommitdiff
path: root/src/mem5.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem5.c')
-rw-r--r--src/mem5.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mem5.c b/src/mem5.c
index acbe92d15..6161945d6 100644
--- a/src/mem5.c
+++ b/src/mem5.c
@@ -23,7 +23,7 @@
** This version of the memory allocation subsystem is included
** in the build only if SQLITE_ENABLE_MEMSYS5 is defined.
**
-** $Id: mem5.c,v 1.9 2008/06/27 13:27:04 danielk1977 Exp $
+** $Id: mem5.c,v 1.10 2008/06/27 14:05:25 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -411,6 +411,10 @@ static int memsys5Init(void *NotUsed){
int nMinLog; /* Log of minimum allocation size in bytes*/
int iOffset;
+ if( !zByte ){
+ return SQLITE_ERROR;
+ }
+
nMinLog = memsys5Log(sqlite3Config.mnReq);
mem5.nAtom = (1<<nMinLog);
while( sizeof(Mem5Link)>mem5.nAtom ){