From aca8be2620157100b58d91f71aceece8d6391148 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 2 Dec 2013 15:21:05 +0000 Subject: [PATCH] * fix potential NPE --- source/net/sourceforge/filebot/media/MediaDetection.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/net/sourceforge/filebot/media/MediaDetection.java b/source/net/sourceforge/filebot/media/MediaDetection.java index 29225874..d8a4664a 100644 --- a/source/net/sourceforge/filebot/media/MediaDetection.java +++ b/source/net/sourceforge/filebot/media/MediaDetection.java @@ -889,10 +889,9 @@ public class MediaDetection { } public static boolean isStructureRoot(File folder) throws IOException { - if (folder.getName().isEmpty() || releaseInfo.getVolumeRoots().contains(folder)) { + if (folder == null || folder.getName() == null || folder.getName().isEmpty() || releaseInfo.getVolumeRoots().contains(folder)) { return true; } - return releaseInfo.getStructureRootPattern().matcher(folder.getName()).matches(); }