Skip to content

Commit e41d3fe

Browse files
authored
Fixes error when controllers are disconnected on XR exit when not being connected to a hand before. (#26387)
1 parent f258d0d commit e41d3fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/jsm/webxr/OculusHandPointerModel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ class OculusHandPointerModel extends THREE.Object3D {
7070
this.visible = false;
7171
this.xrInputSource = null;
7272

73-
this.pointerGeometry.dispose();
74-
this.pointerMesh.material.dispose();
73+
if (this.pointerGeometry) this.pointerGeometry.dispose();
74+
if (this.pointerMesh && this.pointerMesh.material) this.pointerMesh.material.dispose();
7575

7676
this.clear();
7777

0 commit comments

Comments
 (0)