diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-07-07 02:13:42 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-07-07 13:45:37 +0300 |
commit | 6904ab10f4897fe3f82748e7f22833a2ac990d2a (patch) | |
tree | d1714f49bc19a356efe8bd31fc3b9548ddc7c37d /source/blender/windowmanager/intern/wm_xr.c | |
parent | 146ef0dd1e1430a3a6c3e3039475dde814c5a2c8 (diff) |
Add GHOST_XrSession class for cleaner & safer session management
Session code and data structures are now localized. But also, this
enables sessions to use deterministic destruction to end itself cleanly.
So whenever an error occurs, we can use stack unwinding which will cause
graceful ending of the session.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_xr.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_xr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_xr.c b/source/blender/windowmanager/intern/wm_xr.c index 369272a60bf..c9148dda6e7 100644 --- a/source/blender/windowmanager/intern/wm_xr.c +++ b/source/blender/windowmanager/intern/wm_xr.c @@ -269,7 +269,7 @@ static void wm_xr_session_gpu_binding_context_destroy( void wm_xr_session_toggle(struct GHOST_XrContext *xr_context) { - if (GHOST_XrSessionIsRunning(xr_context)) { + if (xr_context && GHOST_XrSessionIsRunning(xr_context)) { GHOST_XrSessionEnd(xr_context); } else { |