From e346e199c3b6ccb80bbf858425eb68b11ee20f21 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 14 Nov 2016 00:33:39 +0800 Subject: [PATCH] Avoid NPE --- source/net/filebot/ui/rename/RenamePanel.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/ui/rename/RenamePanel.java b/source/net/filebot/ui/rename/RenamePanel.java index 1a8926bd..ee690295 100644 --- a/source/net/filebot/ui/rename/RenamePanel.java +++ b/source/net/filebot/ui/rename/RenamePanel.java @@ -283,8 +283,10 @@ public class RenamePanel extends JComponent { Match match = renameModel.getMatch(list.getSelectedIndex()); Map context = renameModel.getMatchContext(match); - MediaBindingBean sample = new MediaBindingBean(match.getValue(), match.getCandidate(), context); - showFormatEditor(sample); + if (match.getValue() != null) { + MediaBindingBean sample = new MediaBindingBean(match.getValue(), match.getCandidate(), context); + showFormatEditor(sample); + } } } }));