diff --git a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java index ef6f41f96ccf..eee23ba8f34f 100644 --- a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java +++ b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java @@ -2376,7 +2376,7 @@ public class UsageViewImpl implements UsageViewEx { Usage toSelect = null; for (Usage usage : toDelete) { Usage next = getNextToSelect(usage); - if (!toDelete.contains(next)) { + if (next != null && !toDelete.contains(next)) { toSelect = next; break; }