* fix potential NPE

This commit is contained in:
Reinhard Pointner 2013-12-02 15:21:05 +00:00
parent f89ee90f72
commit aca8be2620
1 changed files with 1 additions and 2 deletions

View File

@ -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();
}