Browse Source

no exit when session ended

Raanan Weber 5 years ago
parent
commit
7191bd04ed
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Cameras/XR/webXRSessionManager.ts

+ 1 - 1
src/Cameras/XR/webXRSessionManager.ts

@@ -202,7 +202,7 @@ export class WebXRSessionManager implements IDisposable {
      * @returns Promise which resolves after it exits XR
      */
     public exitXRAsync() {
-        if (this.session) {
+        if (this.session && !this._sessionEnded) {
             try {
                 return this.session.end();
             } catch (e) {