diff --git a/SWIG/Source/DOH/Doh/memory.c b/SWIG/Source/DOH/Doh/memory.c index 56b522b06..fcf5ba341 100644 --- a/SWIG/Source/DOH/Doh/memory.c +++ b/SWIG/Source/DOH/Doh/memory.c @@ -42,8 +42,10 @@ static int pools_initialized = 0; static void CreatePool() { Pool *p = 0; - assert((p = (Pool *) DohMalloc(sizeof(Pool)))); - assert((p->ptr = (DohBase *) DohMalloc(sizeof(DohBase)*PoolSize))); + p = (Pool *) DohMalloc(sizeof(Pool)); + assert(p); + p->ptr = (DohBase *) DohMalloc(sizeof(DohBase)*PoolSize); + assert(p->ptr); p->len = PoolSize; p->blen = PoolSize*sizeof(DohBase); p->current = 0;