Don't crash in "_process_hdr()" if "framebuffer.luminance" is empty
If "glFramebufferTexture2D()" fails on old drivers the Vector is empty.
Don't allow to read from empty Vector (NULL pointer).
(cherry picked from commit 7b8fe97888
)
This commit is contained in:
parent
f4f5855168
commit
a827734e03
|
@ -7005,6 +7005,10 @@ void RasterizerGLES2::_process_glow_bloom() {
|
|||
|
||||
void RasterizerGLES2::_process_hdr() {
|
||||
|
||||
if (framebuffer.luminance.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.luminance[0].fbo);
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, framebuffer.color );
|
||||
|
|
Loading…
Reference in New Issue