davidliu
Committed by GitHub

Fix NPE in RegionProvider when host can't be determined (#477)

@@ -111,7 +111,7 @@ constructor( @@ -111,7 +111,7 @@ constructor(
111 } 111 }
112 } 112 }
113 113
114 -internal fun URI.isLKCloud() = regionUrlProviderTesting || host.endsWith(".livekit.cloud") || host.endsWith(".livekit.run") 114 +internal fun URI.isLKCloud() = regionUrlProviderTesting || host != null && (host.endsWith(".livekit.cloud") || host.endsWith(".livekit.run"))
115 115
116 internal fun URI.getCloudConfigUrl(appendPath: String = ""): URI { 116 internal fun URI.getCloudConfigUrl(appendPath: String = ""): URI {
117 val scheme = if (this.scheme.startsWith("ws")) { 117 val scheme = if (this.scheme.startsWith("ws")) {