Skip to content

Commit 56ef09c

Browse files
committed
Fix null pointer in evaluate expression (EA-87276)
1 parent 0205a12 commit 56ef09c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

idea/src/org/jetbrains/kotlin/idea/debugger/evaluate/KotlinCodeFragmentFactory.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,10 @@ class KotlinCodeFragmentFactory: CodeFragmentFactory() {
338338
for ((variableName, variableValue) in entries) {
339339
if (!psiNameHelper.isIdentifier(variableName)) continue
340340

341-
val kotlinProperty = createKotlinProperty(project, variableName, variableValue.type().name(), variableValue)
342-
?: continue
341+
val variableTypeName = variableValue.type()?.name() ?: continue
342+
343+
val kotlinProperty = createKotlinProperty(project, variableName, variableTypeName, variableValue) ?: continue
344+
343345
sb.append("${kotlinProperty.text}\n")
344346
}
345347

0 commit comments

Comments
 (0)