[Bf-blender-cvs] [70cf8bd9c65] soc-2019-openxr: Fix crash on OpenXR error before context is created fully

Julian Eisel noreply at git.blender.org
Sat Jul 13 01:32:58 CEST 2019


Commit: 70cf8bd9c654a61c174e074d33a0b0cfbf7c2a41
Author: Julian Eisel
Date:   Sat Jul 13 01:19:58 2019 +0200
Branches: soc-2019-openxr
https://developer.blender.org/rB70cf8bd9c654a61c174e074d33a0b0cfbf7c2a41

Fix crash on OpenXR error before context is created fully

===================================================================

M	intern/ghost/intern/GHOST_Xr.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_Xr.cpp b/intern/ghost/intern/GHOST_Xr.cpp
index 0028a2c65ec..3d89e860dae 100644
--- a/intern/ghost/intern/GHOST_Xr.cpp
+++ b/intern/ghost/intern/GHOST_Xr.cpp
@@ -45,6 +45,9 @@ GHOST_XrContextHandle GHOST_XrContextCreate(const GHOST_XrContextCreateInfo *cre
   }
   catch (GHOST_XrException &e) {
     xr_context->dispatchErrorMessage(&e);
+    delete xr_context;
+
+    return nullptr;
   }
 
   return (GHOST_XrContextHandle)xr_context;



More information about the Bf-blender-cvs mailing list