diff --git a/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudioStream.cs b/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudioStream.cs index 09248e60..0808b506 100644 --- a/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudioStream.cs +++ b/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudioStream.cs @@ -235,6 +235,11 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp element = _Element; _Element = null; //Now everything "seems" closed } + + // Should not be needed but we had an error report (#226) - so we double check here to prevent a crash + if (element == null) + return; + if (element.TargetState == State.Playing) element.SetState(State.Paused); //Stop output if (_CloseStreamListener != null)