HMPP: Avoid NPE during Kotlin facet serialization

^KT-42029
This commit is contained in:
Dmitriy Dolovov
2020-09-21 21:46:31 +03:00
parent 4653a16450
commit f0cbd6b1a5
@@ -111,7 +111,7 @@ fun Element.getFacetPlatformByConfigurationElement(): TargetPlatform {
if (targetPlatform != null) return targetPlatform
// failed to read list of all platforms. Fallback to legacy algorithm
val platformName = getAttributeValue("platform") as String
val platformName = getAttributeValue("platform") ?: return DefaultIdeTargetPlatformKindProvider.defaultPlatform
return CommonPlatforms.allSimplePlatforms.firstOrNull {
// first, look for exact match through all simple platforms