popups: fix NPE

This commit is contained in:
andrey zaytsev
2018-03-22 21:36:19 +03:00
parent abceafe053
commit eb6d2e8f3c
@@ -96,7 +96,7 @@ public class IntroduceTargetChooser {
JBPopup popup = JBPopupFactory.getInstance().createPopupChooserBuilder(expressions)
.setSelectionMode(ListSelectionModel.SINGLE_SELECTION)
.setSelectedValue(expressions.get(selection > -1 ? selection : null), true)
.setSelectedValue(expressions.get(selection > -1 ? selection : 0), true)
.setAccessibleName(title)
.setTitle(title)
.setMovable(false)