[opengl] fix free bug with new contiguous buffer

This commit is contained in:
Geoffrey McRae 2018-05-15 19:25:22 +10:00
parent adca879fb9
commit 4fd59ce8c9

View File

@ -854,6 +854,10 @@ static void deconfigure(struct Inst * this)
} }
if (this->amdPinnedMemSupport) if (this->amdPinnedMemSupport)
{
if (this->texPixels[0])
free(this->texPixels[0]);
for(int i = 0; i < BUFFER_COUNT; ++i) for(int i = 0; i < BUFFER_COUNT; ++i)
{ {
if (this->fences[i]) if (this->fences[i])
@ -861,13 +865,9 @@ static void deconfigure(struct Inst * this)
glDeleteSync(this->fences[i]); glDeleteSync(this->fences[i]);
this->fences[i] = NULL; this->fences[i] = NULL;
} }
this->texPixels[i] = NULL;
if (this->texPixels[i])
{
free(this->texPixels[i]);
this->texPixels[i] = NULL;
}
} }
}
if (this->glContext) if (this->glContext)
{ {