vk: fix freeing NULL bmodel memory
This commit is contained in:
parent
e1d250e8da
commit
b93ef2e52c
|
@ -805,9 +805,12 @@ void VK_BrushModelDestroy( model_t *mod ) {
|
|||
return;
|
||||
|
||||
VK_RenderModelDestroy(&bmodel->render_model);
|
||||
Mem_Free(bmodel->animated_indexes);
|
||||
Mem_Free(bmodel->surface_to_geometry_index);
|
||||
Mem_Free(bmodel->render_model.geometries);
|
||||
if (bmodel->animated_indexes)
|
||||
Mem_Free(bmodel->animated_indexes);
|
||||
if (bmodel->surface_to_geometry_index)
|
||||
Mem_Free(bmodel->surface_to_geometry_index);
|
||||
if (bmodel->render_model.geometries)
|
||||
Mem_Free(bmodel->render_model.geometries);
|
||||
Mem_Free(bmodel);
|
||||
mod->cache.data = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue