From d8bfb7c05406efe9626995336c99853106abd9f7 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Sun, 11 Jul 2021 11:07:16 +0200 Subject: [PATCH] Instrument checks connection status before sending stop component message. --- Content.Client/Instruments/InstrumentComponent.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Client/Instruments/InstrumentComponent.cs b/Content.Client/Instruments/InstrumentComponent.cs index d864f5e8ea..66f5ddd458 100644 --- a/Content.Client/Instruments/InstrumentComponent.cs +++ b/Content.Client/Instruments/InstrumentComponent.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using Content.Shared.Instruments; using Content.Shared.Physics; +using Robust.Client; using Robust.Client.Audio.Midi; using Robust.Shared.Audio.Midi; using Robust.Shared.GameObjects; @@ -255,7 +256,7 @@ namespace Content.Client.Instruments _renderer = null; _midiEventBuffer.Clear(); - if (!fromStateChange) + if (!fromStateChange && IoCManager.Resolve().IsConnected) { SendNetworkMessage(new InstrumentStopMidiMessage()); }