Fixed a NullPointerException in Modeldff4_finewe
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Wed, 2 Oct 2019 14:12:49 +0000 (16:12 +0200)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Wed, 2 Oct 2019 14:12:49 +0000 (16:12 +0200)
plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/Modeldff4_finewe.java

index a3e7047..d362a15 100644 (file)
@@ -80,7 +80,7 @@ public class Modeldff4_finewe extends SimpleRectangularHardcodedModelComponent
                switch (stateID)
                {
                case "q":
-                       return BitVector.of(Arrays.copyOfRange((Bit[]) state, 1, 5));
+                       return state == null ? BitVector.of(U, U, U, U) : BitVector.of(Arrays.copyOfRange((Bit[]) state, 1, 5));
                default:
                        return super.getHighLevelState(state, stateID);
                }