Fix null-pointer dereference on error handling during VR view drawing
This commit is contained in:
parent
7afd84df40
commit
4cfa21f09b
|
@ -1317,7 +1317,10 @@ static void wm_xr_session_surface_draw(bContext *C)
|
|||
|
||||
GHOST_XrSessionDrawViews(wm->xr.runtime->context, &draw_data);
|
||||
|
||||
GPU_framebuffer_restore();
|
||||
/* There's no active framebuffer if the session was cancelled (exception while drawing views). */
|
||||
if (GPU_framebuffer_active_get()) {
|
||||
GPU_framebuffer_restore();
|
||||
}
|
||||
}
|
||||
|
||||
static void wm_xr_session_do_depsgraph(bContext *C)
|
||||
|
|
Loading…
Reference in New Issue