Fix NPE when API is used with NULL-incompatible collection

https://github.com/JetBrains/intellij-community/pull/1442

GitOrigin-RevId: 03555688c848d49cc6875eec8a0b508df90a3f73
This commit is contained in:
Vassiliy.Kudryashov
2020-09-28 16:02:10 +00:00
committed by intellij-monorepo-bot
parent cbd506b81b
commit 05f49f9e18
@@ -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;
}