Fixing a few bugs. Still need to check for the backtrack analysis.
[jpf-core.git] / src / main / gov / nasa / jpf / listener / StateReducer.java
index 82e8cf8..e594c28 100644 (file)
@@ -162,7 +162,7 @@ public class StateReducer extends ListenerAdapter {
     for(IntChoiceFromSet cg : cgMap.keySet()) {
       int event = cgMap.get(cg);
       LinkedList<Integer[]> choiceLists = backtrackMap.get(event);
-      if (choiceLists.peekFirst() != null) {
+      if (choiceLists != null && choiceLists.peekFirst() != null) {
         Integer[] choiceList = choiceLists.removeFirst();
         // Deploy the new choice list for this CG
         cg.setNewValues(choiceList);