From faaaa69fa7b12f9340aeb595f0066251f9b8ab53 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Wed, 21 Mar 2018 15:31:53 +0200 Subject: [PATCH] RegExFindComponent doesn't attempt to evaluate the (null) signal when no signal has been received yet. --- .../Source/Items/Components/Signal/RegExFindComponent.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/Signal/RegExFindComponent.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/Signal/RegExFindComponent.cs index eef6630b0..262a45d85 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/Signal/RegExFindComponent.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/Signal/RegExFindComponent.cs @@ -54,9 +54,9 @@ namespace Barotrauma.Items.Components public override void Update(float deltaTime, Camera cam) { - if (string.IsNullOrWhiteSpace(expression) || regex==null) return; + if (string.IsNullOrWhiteSpace(expression) || regex == null) return; - if (receivedSignal != previousReceivedSignal) + if (receivedSignal != previousReceivedSignal && receivedSignal != null) { try {