Fix T79347 GPU: Segfault starting blender

This commit is contained in:
Clément Foucault 2020-07-30 19:43:18 +02:00
parent 9132fd8825
commit 848cbe889b
Notes: blender-bot 2023-02-14 11:28:43 +01:00
Referenced by issue #79541, Freestyle render is completely black
Referenced by issue #79347, Segfault starting blender
1 changed files with 1 additions and 1 deletions

View File

@ -450,7 +450,7 @@ static void gpu_framebuffer_update_attachments_and_fill_empty_slots(GPUFrameBuff
BLI_assert(GPU_framebuffer_active_get() == fb);
/* Update attachments */
for (int i_type = GPU_FB_MAX_ATTACHEMENT; i_type >= 0; --i_type) {
for (int i_type = GPU_FB_MAX_ATTACHEMENT - 1; i_type >= 0; --i_type) {
GPUAttachmentType type = static_cast<GPUAttachmentType>(i_type);
GPUTexture *tex = fb->attachments[type].tex;