Fix T74248: Crash using a movie clip for the camera background
Missing NULL check in recent half-float support.
This commit is contained in:
parent
1a1f2912e6
commit
80684ca41c
Notes:
blender-bot
2023-02-14 10:43:47 +01:00
Referenced by issue #74248, Crash when setting a movie clip as a Camera background image.
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue