Fix T57326: Adding Scene with Transparent Film to VSE Crashes Blender

Previous Framebuffer can be NULL.
This commit is contained in:
Clément Foucault 2018-10-22 22:49:33 +02:00
parent 28d5ebbc15
commit 51b6e313de
Notes: blender-bot 2023-02-14 07:17:43 +01:00
Referenced by issue #57326, Adding Scene with Transparent Film to VSE Crashes Blender
1 changed files with 5 additions and 1 deletions

View File

@ -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);
}
}
/**