Fix mode core library being null

This commit is contained in:
Jakub Valtar
2016-04-30 16:50:45 +02:00
parent 1cb8773ba5
commit 824fdd8a59

View File

@@ -568,9 +568,18 @@ public class ErrorCheckerService {
}
// Mode class path
String coreClassPath = mode.getCoreLibrary().getClassPath();
if (coreClassPath != null) {
classPath.append(File.pathSeparator).append(coreClassPath);
if (neededImports == null) {
String searchClassPath = mode.getSearchPath();
if (searchClassPath != null) {
classPath.append(File.pathSeparator).append(searchClassPath);
}
} else {
Library coreLibrary = mode.getCoreLibrary();
String coreClassPath = coreLibrary != null ?
coreLibrary.getClassPath() : mode.getSearchPath();
if (coreClassPath != null) {
classPath.append(File.pathSeparator).append(coreClassPath);
}
}
// Core libraries