Skip to content

Commit 53e59f2

Browse files
committed
Fix #884 PIEAE in ListenerLineMarker nav handler
1 parent 63ebbbe commit 53e59f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/kotlin/insight/ListenerLineMarkerProvider.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ class ListenerLineMarkerProvider : LineMarkerProviderDescriptor() {
6161
// even if the event target is a nested class.
6262
private fun createHandler(method: UMethod): GutterIconNavigationHandler<PsiElement> {
6363
return GutterIconNavigationHandler handler@{ _, element ->
64+
if (!method.isPsiValid) {
65+
return@handler
66+
}
67+
6468
// We need to re-evaluate the targeted method, because if the method signature slightly changes before
6569
// IntelliJ decides to re-evaluate the method, but the class is no longer valid.
6670
// In this circumstance, we can find the class anyways because it's still a valid listener.

0 commit comments

Comments
 (0)