diff --git a/src/com/characterforming/jrte/engine/Model.java b/src/com/characterforming/jrte/engine/Model.java index 5812c13..45de400 100644 --- a/src/com/characterforming/jrte/engine/Model.java +++ b/src/com/characterforming/jrte/engine/Model.java @@ -351,7 +351,7 @@ protected int addSignal(Bytes signalName) { } protected int addTransducer(Bytes transducerName) { - Integer ordinal = this.transducerOrdinalMap.get(transducerName); + Integer ordinal = this.transducerOrdinalMap.computeIfAbsent(transducerName, absent -> null); assert ordinal == null || transducerName.equals(this.transducerNameIndex[ordinal]); if (ordinal == null) { ordinal = this.transducerOrdinalMap.size();