fix a use of tempmempool to be loadmodel->mempool
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 30 Mar 2009 05:35:50 +0000 (05:35 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 30 Mar 2009 05:35:50 +0000 (05:35 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8833 d7cf8633-e32d-0410-b094-e92efae38249

model_shared.c

index 2c46c01..664f0da 100644 (file)
@@ -2176,7 +2176,7 @@ void Mod_MakeSortedSurfaces(dp_model_t *mod)
        int *firstsurfacefortexture;
        int *numsurfacesfortexture;
        if (!mod->sortedmodelsurfaces)
-               mod->sortedmodelsurfaces = Mem_Alloc(tempmempool, mod->nummodelsurfaces * sizeof(*mod->sortedmodelsurfaces));
+               mod->sortedmodelsurfaces = Mem_Alloc(loadmodel->mempool, mod->nummodelsurfaces * sizeof(*mod->sortedmodelsurfaces));
        firstsurfacefortexture = Mem_Alloc(tempmempool, mod->num_textures * sizeof(*firstsurfacefortexture));
        numsurfacesfortexture = Mem_Alloc(tempmempool, mod->num_textures * sizeof(*numsurfacesfortexture));
        memset(numsurfacesfortexture, 0, mod->num_textures * sizeof(*numsurfacesfortexture));