Skip to content

Commit b2a1327

Browse files
authored
Merge pull request #9411 from keveleigh/fix-oculus
Add null check for XR not initialized
2 parents d0e04ec + 57d5191 commit b2a1327

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Assets/MRTK/Providers/XRSDK/XRSDKDeviceManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public virtual bool CheckCapability(MixedRealityCapability capability)
6262
/// </summary>
6363
/// <param name="loaderName">The string name to compare against the active loader.</param>
6464
/// <returns>True if the active loader has the same name as the parameter.</returns>
65-
protected virtual bool IsLoaderActive(string loaderName) => XRGeneralSettings.Instance.Manager.activeLoader.name == loaderName;
65+
protected virtual bool IsLoaderActive(string loaderName) => XRGeneralSettings.Instance.Manager.activeLoader != null && XRGeneralSettings.Instance.Manager.activeLoader.name == loaderName;
6666

6767
/// <summary>
6868
/// Checks if the active loader is of a specific type. Used in cases where the loader class is accessible, like OculusLoader.

0 commit comments

Comments
 (0)