diff options
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 17c495c82d6..7fabb2feb51 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -728,9 +728,12 @@ void GPU_invalid_tex_bind(int mode) void GPU_invalid_tex_free(void) { - GPU_texture_free(GG.invalid_tex_1D); - GPU_texture_free(GG.invalid_tex_2D); - GPU_texture_free(GG.invalid_tex_3D); + if (GG.invalid_tex_1D) + GPU_texture_free(GG.invalid_tex_1D); + if (GG.invalid_tex_2D) + GPU_texture_free(GG.invalid_tex_2D); + if (GG.invalid_tex_3D) + GPU_texture_free(GG.invalid_tex_3D); } |