diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-10-22 23:49:33 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-10-23 19:04:45 +0300 |
commit | 51b6e313de10c2495fde0d548df45f0d4b442d88 (patch) | |
tree | cdf79ea4ccf63ff3ce4d56a6ba7a3b9295a9ee1b /source/blender/gpu/intern | |
parent | 28d5ebbc15f7d01fd08148c50cabc5805472e567 (diff) |
Fix T57326: Adding Scene with Transparent Film to VSE Crashes Blender
Previous Framebuffer can be NULL.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_framebuffer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c index 7329eee44b0..20341b5d1e2 100644 --- a/source/blender/gpu/intern/gpu_framebuffer.c +++ b/source/blender/gpu/intern/gpu_framebuffer.c @@ -605,10 +605,14 @@ void GPU_framebuffer_blit( if (fb_write == prev_fb) { GPU_framebuffer_bind(fb_write); /* To update drawbuffers */ } - else { + else if (prev_fb) { glBindFramebuffer(GL_FRAMEBUFFER, prev_fb->object); gpu_framebuffer_current_set(prev_fb); } + else { + glBindFramebuffer(GL_FRAMEBUFFER, 0); + gpu_framebuffer_current_set(NULL); + } } /** |