Also allocate mipmap for MD2

This commit is contained in:
James R 2019-11-07 18:04:53 -08:00
parent d2a7a87c7f
commit 99cd5161be

View file

@ -733,8 +733,11 @@ static void md2_loadTexture(md2_t *model)
Z_Free(grpatch->mipmap->grInfo.data);
}
else
{
grpatch = Z_Calloc(sizeof *grpatch, PU_HWRPATCHINFO,
&(model->grpatch));
grpatch->mipmap = Z_Calloc(sizeof (GLMipmap_t), PU_HWRPATCHINFO, NULL);
}
if (!grpatch->mipmap->downloaded && !grpatch->mipmap->grInfo.data)
{
@ -783,8 +786,11 @@ static void md2_loadBlendTexture(md2_t *model)
Z_Free(grpatch->mipmap->grInfo.data);
}
else
{
grpatch = Z_Calloc(sizeof *grpatch, PU_HWRPATCHINFO,
&(model->blendgrpatch));
grpatch->mipmap = Z_Calloc(sizeof (GLMipmap_t), PU_HWRPATCHINFO, NULL);
}
if (!grpatch->mipmap->downloaded && !grpatch->mipmap->grInfo.data)
{