1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-05 00:45:06 -05:00

* fixed possible NPE

This commit is contained in:
Reinhard Pointner 2012-02-09 14:16:31 +00:00
parent b2fbba3a2d
commit baf01fad74

View File

@ -266,7 +266,7 @@ public class CmdlineOperations implements CmdlineInterface {
// handle movie files // handle movie files
File[] movieFiles = filter(mediaFiles, VIDEO_FILES).toArray(new File[0]); File[] movieFiles = filter(mediaFiles, VIDEO_FILES).toArray(new File[0]);
File[] subtitleFiles = filter(mediaFiles, SUBTITLE_FILES).toArray(new File[0]); File[] subtitleFiles = filter(mediaFiles, SUBTITLE_FILES).toArray(new File[0]);
Movie[] movieByFileHash = null; Movie[] movieByFileHash = new Movie[movieFiles.length];
if (movieFiles.length > 0 && query == null) { if (movieFiles.length > 0 && query == null) {
// match movie hashes online // match movie hashes online
@ -276,7 +276,6 @@ public class CmdlineOperations implements CmdlineInterface {
Analytics.trackEvent(service.getName(), "HashLookup", "Movie", movieByFileHash.length - frequency(asList(movieByFileHash), null)); // number of positive hash lookups Analytics.trackEvent(service.getName(), "HashLookup", "Movie", movieByFileHash.length - frequency(asList(movieByFileHash), null)); // number of positive hash lookups
} catch (UnsupportedOperationException e) { } catch (UnsupportedOperationException e) {
CLILogger.fine(format("%s: Hash lookup not supported", service.getName())); CLILogger.fine(format("%s: Hash lookup not supported", service.getName()));
movieByFileHash = new Movie[movieFiles.length];
} }
} }