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:
Rémi Verschelde 2016-09-26 09:49:49 +02:00 committed by GitHub
commit db1a9863d2
1 changed files with 4 additions and 0 deletions

View File

@ -7018,6 +7018,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 );