Misc: Fix NPE on external project import

This commit is contained in:
Alexey Sedunov
2017-12-18 18:17:31 +03:00
parent 4a6cc3913d
commit 88540360b4
@@ -219,9 +219,10 @@ fun KotlinFacet.configureFacet(
platformKind,
compilerVersion
)
// Both apiLevel and languageLevel should be initialized in the lines above
if (apiLevel!! > languageLevel!!) {
apiLevel = languageLevel
val apiLevel = apiLevel
val languageLevel = languageLevel
if (languageLevel != null && apiLevel != null && apiLevel > languageLevel) {
this.apiLevel = languageLevel
}
this.coroutineSupport = coroutineSupport
}