aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main
diff options
context:
space:
mode:
authorAlex Saveau <asaveau@google.com>2020-07-10 00:57:03 +0000
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-07-13 13:17:02 +0200
commit26b065a2cfadf500f0b37f051675eebdcda00253 (patch)
tree0bae033db068c96fffe4b0313d2c1fc41cca43b0 /plugins/base/src/main
parentec318a2ac97aa5ab88564dc36474131fc03cba61 (diff)
downloaddokka-26b065a2cfadf500f0b37f051675eebdcda00253.tar.gz
dokka-26b065a2cfadf500f0b37f051675eebdcda00253.tar.bz2
dokka-26b065a2cfadf500f0b37f051675eebdcda00253.zip
Fix NPE
Diffstat (limited to 'plugins/base/src/main')
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
index 5e03be6e..d426d41b 100644
--- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
@@ -435,10 +435,10 @@ class DefaultPsiToDocumentableTranslator(
is PsiAnnotation -> toAnnotation()?.let { AnnotationValue(it) }
is PsiArrayInitializerMemberValue -> ArrayValue(initializers.mapNotNull { it.toValue() })
is PsiReferenceExpression -> psiReference?.let { EnumValue(text ?: "", DRI.from(it)) }
- is PsiClassObjectAccessExpression -> ClassValue(
- text ?: "",
- DRI.from(((type as PsiImmediateClassType).parameters.single() as PsiClassReferenceType).resolve()!!)
- )
+ is PsiClassObjectAccessExpression -> {
+ val psiClass = ((type as PsiImmediateClassType).parameters.single() as PsiClassReferenceType).resolve()
+ psiClass?.let { ClassValue(text ?: "", DRI.from(psiClass)) }
+ }
else -> StringValue(text ?: "")
}