From 05f49f9e185aea01161f0792bbc0d27c8d631c03 Mon Sep 17 00:00:00 2001 From: "Vassiliy.Kudryashov" Date: Mon, 28 Sep 2020 19:00:54 +0300 Subject: [PATCH] Fix NPE when API is used with NULL-incompatible collection https://github.com/JetBrains/intellij-community/pull/1442 GitOrigin-RevId: 03555688c848d49cc6875eec8a0b508df90a3f73 --- .../usageView/src/com/intellij/usages/impl/UsageViewImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }