From fc1231a284b71dd36d81eb99e2cf5c66cd8d96af Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Wed, 2 Oct 2019 16:12:49 +0200 Subject: [PATCH] Fixed a NullPointerException in Modeldff4_finewe --- .../logic/model/am2900/components/Modeldff4_finewe.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/Modeldff4_finewe.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/Modeldff4_finewe.java index a3e7047e..d362a157 100644 --- a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/Modeldff4_finewe.java +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/Modeldff4_finewe.java @@ -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); } -- 2.17.1