소스 검색

Fixes error when controllers are disconnected on XR exit when not being connected to a hand before. (#26387)

hybridherbst 2 년 전
부모
커밋
e41d3feea2
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      examples/jsm/webxr/OculusHandPointerModel.js

+ 2 - 2
examples/jsm/webxr/OculusHandPointerModel.js

@@ -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();
 

粤ICP备19079148号