From 4fd59ce8c9b08febbd1dc3c336ae5f8c0d4f2a32 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 15 May 2018 19:25:22 +1000 Subject: [PATCH] [opengl] fix free bug with new contiguous buffer --- client/renderers/opengl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/renderers/opengl.c b/client/renderers/opengl.c index 02843435..ca95edfe 100644 --- a/client/renderers/opengl.c +++ b/client/renderers/opengl.c @@ -854,6 +854,10 @@ static void deconfigure(struct Inst * this) } if (this->amdPinnedMemSupport) + { + if (this->texPixels[0]) + free(this->texPixels[0]); + for(int i = 0; i < BUFFER_COUNT; ++i) { if (this->fences[i]) @@ -861,13 +865,9 @@ static void deconfigure(struct Inst * this) glDeleteSync(this->fences[i]); this->fences[i] = NULL; } - - if (this->texPixels[i]) - { - free(this->texPixels[i]); - this->texPixels[i] = NULL; - } + this->texPixels[i] = NULL; } + } if (this->glContext) {