1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-04 08:25:03 -05:00

* fix type panel NPE that crashed it

This commit is contained in:
Reinhard Pointner 2012-09-17 15:22:23 +00:00
parent 339c267f6b
commit 79b58654ca

View File

@ -49,10 +49,13 @@ class TypeTool extends Tool<TreeModel> {
for (Iterator<File> iterator = sourceModel.fileIterator(); iterator.hasNext();) { for (Iterator<File> iterator = sourceModel.fileIterator(); iterator.hasNext();) {
File file = iterator.next(); File file = iterator.next();
String extension = FileUtilities.getExtension(file).toLowerCase();
String extension = FileUtilities.getExtension(file);
if (extension != null) {
extension = extension.toLowerCase();
}
List<File> files = map.get(extension); List<File> files = map.get(extension);
if (files == null) { if (files == null) {
files = new ArrayList<File>(50); files = new ArrayList<File>(50);
map.put(extension, files); map.put(extension, files);