Commit 3b11b390 authored by Elemer Lelik's avatar Elemer Lelik
Browse files

Merge pull request #23 from elnrnag/master

Preventing crash in case of deleted file in the workspace
parents d8b4468a 86f5820a
......@@ -174,11 +174,11 @@ public final class CfgAnalyzer {
}
public List<SyntacticErrorStorage> getErrorStorage() {
if (!lexerListener.getErrorsStored().isEmpty() && parserListener.getErrorsStored().isEmpty()) {
if (lexerListener != null && !lexerListener.getErrorsStored().isEmpty() && parserListener != null && parserListener.getErrorsStored().isEmpty()) {
return lexerListener.getErrorsStored();
} else if (lexerListener.getErrorsStored().isEmpty() && !parserListener.getErrorsStored().isEmpty()) {
} else if (lexerListener != null && lexerListener.getErrorsStored().isEmpty() && parserListener != null && !parserListener.getErrorsStored().isEmpty()) {
return parserListener.getErrorsStored();
} else if (!lexerListener.getErrorsStored().isEmpty() && !parserListener.getErrorsStored().isEmpty()) {
} else if (lexerListener != null && !lexerListener.getErrorsStored().isEmpty() && parserListener != null && !parserListener.getErrorsStored().isEmpty()) {
if (lexerListener.addAll(parserListener.getErrorsStored())) {
return lexerListener.getErrorsStored();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment