From 79b58654ca744e001d635c9918496f459c1a1a5b Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 17 Sep 2012 15:22:23 +0000 Subject: [PATCH] * fix type panel NPE that crashed it --- source/net/sourceforge/filebot/ui/analyze/TypeTool.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/net/sourceforge/filebot/ui/analyze/TypeTool.java b/source/net/sourceforge/filebot/ui/analyze/TypeTool.java index 20da771f..16e5f171 100644 --- a/source/net/sourceforge/filebot/ui/analyze/TypeTool.java +++ b/source/net/sourceforge/filebot/ui/analyze/TypeTool.java @@ -49,10 +49,13 @@ class TypeTool extends Tool { for (Iterator iterator = sourceModel.fileIterator(); iterator.hasNext();) { File file = iterator.next(); - String extension = FileUtilities.getExtension(file).toLowerCase(); + + String extension = FileUtilities.getExtension(file); + if (extension != null) { + extension = extension.toLowerCase(); + } List files = map.get(extension); - if (files == null) { files = new ArrayList(50); map.put(extension, files);