Avoid NPE

This commit is contained in:
Reinhard Pointner 2016-11-14 00:33:39 +08:00
parent 7feeb0a3be
commit e346e199c3
1 changed files with 4 additions and 2 deletions

View File

@ -283,10 +283,12 @@ public class RenamePanel extends JComponent {
Match<Object, File> match = renameModel.getMatch(list.getSelectedIndex()); Match<Object, File> match = renameModel.getMatch(list.getSelectedIndex());
Map<File, Object> context = renameModel.getMatchContext(match); Map<File, Object> context = renameModel.getMatchContext(match);
if (match.getValue() != null) {
MediaBindingBean sample = new MediaBindingBean(match.getValue(), match.getCandidate(), context); MediaBindingBean sample = new MediaBindingBean(match.getValue(), match.getCandidate(), context);
showFormatEditor(sample); showFormatEditor(sample);
} }
} }
}
})); }));
setLayout(new MigLayout("fill, insets dialog, gapx 10px", "[fill][align center, pref!][fill]", "align 33%")); setLayout(new MigLayout("fill, insets dialog, gapx 10px", "[fill][align center, pref!][fill]", "align 33%"));