]> git.xonotic.org Git - voretournament/voretournament.git/blobdiff - misc/source/darkplaces-src/zone.c
Update the prebuilt engines to latest version of darkplaces. Also put Linux rebrand...
[voretournament/voretournament.git] / misc / source / darkplaces-src / zone.c
index 2f756d0ea803601a9d7d2ce64368f889516068d3..16386369c21c1694527a74f2a403457fa8f405d7 100644 (file)
@@ -382,7 +382,12 @@ void *_Mem_Alloc(mempool_t *pool, void *olddata, size_t size, size_t alignment,
                return NULL;
        }
        if (pool == NULL)
-               Sys_Error("Mem_Alloc: pool == NULL (alloc at %s:%i)", filename, fileline);
+       {
+               if(olddata)
+                       pool = ((memheader_t *)((unsigned char *) olddata - sizeof(memheader_t)))->pool;
+               else
+                       Sys_Error("Mem_Alloc: pool == NULL (alloc at %s:%i)", filename, fileline);
+       }
        if (mem_mutex)
                Thread_LockMutex(mem_mutex);
        if (developer_memory.integer)