Merge pull request #6607 from zaps166/fix-crash-in-process_hdr
Don't crash in "_process_hdr()" if "framebuffer.luminance" is empty
This commit is contained in:
commit
db1a9863d2
@ -7018,6 +7018,10 @@ void RasterizerGLES2::_process_glow_bloom() {
|
|||||||
|
|
||||||
void RasterizerGLES2::_process_hdr() {
|
void RasterizerGLES2::_process_hdr() {
|
||||||
|
|
||||||
|
if (framebuffer.luminance.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.luminance[0].fbo);
|
glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.luminance[0].fbo);
|
||||||
glActiveTexture(GL_TEXTURE0);
|
glActiveTexture(GL_TEXTURE0);
|
||||||
glBindTexture(GL_TEXTURE_2D, framebuffer.color );
|
glBindTexture(GL_TEXTURE_2D, framebuffer.color );
|
||||||
|
Loading…
Reference in New Issue
Block a user