Double check for null in _Dispose of CGstreamerSharpAudioStream (closes #226)
This commit is contained in:
1 parent
a284b0f2b9
commit
836aeeba92
1 file changed
+5
@@ -235,6 +235,11 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp
|
|||||||
element = _Element;
|
element = _Element;
|
||||||
_Element = null; //Now everything "seems" closed
|
_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)
|
if (element.TargetState == State.Playing)
|
||||||
element.SetState(State.Paused); //Stop output
|
element.SetState(State.Paused); //Stop output
|
||||||
if (_CloseStreamListener != null)
|
if (_CloseStreamListener != null)
|
||||||
|
|||||||
Reference in new issue
Block a user