diff --git a/org.eclipselabs.dte/src/org/eclipselabs/dte/TextFileDetector.java b/org.eclipselabs.dte/src/org/eclipselabs/dte/TextFileDetector.java index ff3ab7e..c185e25 100644 --- a/org.eclipselabs.dte/src/org/eclipselabs/dte/TextFileDetector.java +++ b/org.eclipselabs.dte/src/org/eclipselabs/dte/TextFileDetector.java @@ -139,7 +139,7 @@ public static boolean isTextFile(InputStream is) throws IOException { // The file is text if a charset with confidence of at least 10 (out // of 100) is detected. Empty files have confidence 10 for UTF-8. - return match.getConfidence() >= 10; + return match != null && match.getConfidence() >= 10; } /**