diff --git a/src/main/java/no/birkett/kiwi/Solver.java b/src/main/java/no/birkett/kiwi/Solver.java index c150020..ccb6522 100644 --- a/src/main/java/no/birkett/kiwi/Solver.java +++ b/src/main/java/no/birkett/kiwi/Solver.java @@ -219,7 +219,7 @@ public class Solver { if (row.coefficientFor(tag.marker) < 0.0) return tag.marker; } - if (tag.other.getType() == Symbol.Type.SLACK || tag.other.getType() == Symbol.Type.ERROR) { + if (tag.other != null && (tag.other.getType() == Symbol.Type.SLACK || tag.other.getType() == Symbol.Type.ERROR)) { if (row.coefficientFor(tag.other) < 0.0) return tag.other; }