Add missing draw state check to OVERLAY_edit_mesh_draw

Fix for T72309. The crash was caused by a missing check of the draw state, which resulted in dereferencing of a null pointer.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6380
This commit is contained in:
Robert Guetzkow 2019-12-11 13:37:10 +01:00 committed by Clément Foucault
parent 7683641a7f
commit a1bd78b488
1 changed files with 3 additions and 1 deletions

View File

@ -360,7 +360,9 @@ void OVERLAY_edit_mesh_draw(OVERLAY_Data *vedata)
OVERLAY_PrivateData *pd = vedata->stl->pd;
OVERLAY_FramebufferList *fbl = vedata->fbl;
GPU_framebuffer_bind(fbl->overlay_default_fb);
if (DRW_state_is_fbo()) {
GPU_framebuffer_bind(fbl->overlay_default_fb);
}
DRW_draw_pass(psl->edit_mesh_weight_ps);
DRW_draw_pass(psl->edit_mesh_analysis_ps);