Skip to content
Snippets Groups Projects
Commit 81cfca29 authored by Lactozilla's avatar Lactozilla :speech_balloon:
Browse files

Fix FreeMipmapColormap yet again

parent 82cbd953
Branches
Tags
No related merge requests found
...@@ -781,9 +781,12 @@ static void FreeMipmapColormap(INT32 patchnum, void *patch) ...@@ -781,9 +781,12 @@ static void FreeMipmapColormap(INT32 patchnum, void *patch)
// Confusing at first, but pat->mipmap->nextcolormap // Confusing at first, but pat->mipmap->nextcolormap
// at the beginning of the loop is the first colormap // at the beginning of the loop is the first colormap
// from the linked list of colormaps // from the linked list of colormaps
GLMipmap_t *next = pat->mipmap->nextcolormap; GLMipmap_t *next = pat->mipmap;
if (!next) // No mipmap in this patch, break out of loop.
break;
// Set the first colormap // Set the first colormap
// to the one that comes after it // to the one that comes after it
next = next->nextcolormap;
pat->mipmap->nextcolormap = next->nextcolormap; pat->mipmap->nextcolormap = next->nextcolormap;
// Free image data from memory // Free image data from memory
if (next->grInfo.data) if (next->grInfo.data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment