Skip to content

Commit b276742

Browse files
committed
Fix NRE when custom controller has no visualizer
1 parent e68b246 commit b276742

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/ControllerFinder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected virtual void TryAndAddControllerTransform()
100100
/// <param name="newController">The new controller to be tracked.</param>
101101
protected virtual void AddControllerTransform(IMixedRealityController newController)
102102
{
103-
if (newController.ControllerHandedness == handedness && newController.Visualizer.GameObjectProxy.transform != null && !newController.Visualizer.GameObjectProxy.transform.Equals(ControllerTransform))
103+
if (newController.ControllerHandedness == handedness && newController.Visualizer != null && newController.Visualizer.GameObjectProxy.transform != null && !newController.Visualizer.GameObjectProxy.transform.Equals(ControllerTransform))
104104
{
105105
ControllerTransform = newController.Visualizer.GameObjectProxy.transform;
106106

0 commit comments

Comments
 (0)