diff --git a/source/net/sourceforge/filebot/media/MediaDetection.java b/source/net/sourceforge/filebot/media/MediaDetection.java index 8cdc607a..5e6daa92 100644 --- a/source/net/sourceforge/filebot/media/MediaDetection.java +++ b/source/net/sourceforge/filebot/media/MediaDetection.java @@ -629,8 +629,8 @@ public class MediaDetection { } } - if (stripReleaseInfo(f.getParentFile().getName()).length() > 0) { - return f.getParentFile(); + if (movieFile.getParentFile() != null && stripReleaseInfo(movieFile.getParentFile().getName()).length() > 0) { + return movieFile.getParentFile(); } return null; }