diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/image_gpu.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/image_gpu.c b/source/blender/blenkernel/intern/image_gpu.c index e3ed7cdc8de..22fb6dfd02a 100644 --- a/source/blender/blenkernel/intern/image_gpu.c +++ b/source/blender/blenkernel/intern/image_gpu.c @@ -381,12 +381,9 @@ static void gpu_free_unused_buffers(void) BLI_mutex_lock(&gpu_texture_queue_mutex); - if (gpu_texture_free_queue != NULL) { - GPUTexture *tex; - while ((tex = (GPUTexture *)BLI_linklist_pop(&gpu_texture_free_queue))) { - GPU_texture_free(tex); - } - gpu_texture_free_queue = NULL; + while (gpu_texture_free_queue != NULL) { + GPUTexture *tex = BLI_linklist_pop(&gpu_texture_free_queue); + GPU_texture_free(tex); } BLI_mutex_unlock(&gpu_texture_queue_mutex); |