Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-02-27 07:58:31 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-02-27 08:08:44 +0300
commit80684ca41c52bce394fef81d3e70a2a9e14f661a (patch)
treec3a7635fb6f0f519b7c461482963774f9190d9d4 /source/blender/gpu
parent1a1f2912e65e99a38528e4cf18094a29412e17d5 (diff)
Fix T74248: Crash using a movie clip for the camera background
Missing NULL check in recent half-float support.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_draw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 62a5de7ebe6..d674f8600c2 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -1077,7 +1077,8 @@ void GPU_create_gl_tex(uint *bind,
glGenTextures(1, (GLuint *)bind);
glBindTexture(textarget, *bind);
- GLenum float_format = (!half_float && ima->flag & IMA_HIGH_BITDEPTH) ? GL_RGBA32F : GL_RGBA16F;
+ GLenum float_format = (!half_float && (ima && (ima->flag & IMA_HIGH_BITDEPTH))) ? GL_RGBA32F :
+ GL_RGBA16F;
GLenum internal_format = (frect) ? float_format : (use_srgb) ? GL_SRGB8_ALPHA8 : GL_RGBA8;
if (textarget == GL_TEXTURE_2D) {