Commit d2401503 authored by Johannes Roith's avatar Johannes Roith

Fix crashes.

parent 069e72c5
......@@ -313,6 +313,12 @@ public class CupConflictGraphView implements ICupParserLaLrChangeObserver,
}
stateHashMap.clear();
CupContext lalrContext = model.getLaLrContext();
if (lalrContext == null) {
System.err.println("CupConflictGraphView: lalrResult was null.");
return;
}
lalr_state.lalr_state_shared sharedState = lalr_state
.getShared(lalrContext);
Enumeration allEnum = sharedState.all();
......
......@@ -491,6 +491,11 @@ public class CupReduceGraphView implements ICupParserLaLrChangeObserver,
this.lalrContext = lalrContext;
this.lalrResult = lalrResult;
if (lalrResult == null) {
System.err.println("ParserNodeModelContentProvider: lalrResult was null.");
return;
}
if (rebuildJob == null || (rebuildJob.getState() != Job.RUNNING)) {
if (rebuildJob != null) {
rebuildJob.cancel();
......
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