Skip to content

Commit

Permalink
Fixes error when controllers are disconnected on XR exit when not bei…
Browse files Browse the repository at this point in the history
…ng connected to a hand before. (#26387)
  • Loading branch information
hybridherbst committed Jul 7, 2023
1 parent f258d0d commit e41d3fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/jsm/webxr/OculusHandPointerModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ class OculusHandPointerModel extends THREE.Object3D {
this.visible = false;
this.xrInputSource = null;

this.pointerGeometry.dispose();
this.pointerMesh.material.dispose();
if (this.pointerGeometry) this.pointerGeometry.dispose();
if (this.pointerMesh && this.pointerMesh.material) this.pointerMesh.material.dispose();

this.clear();

Expand Down

0 comments on commit e41d3fe

Please sign in to comment.