Skip to content

Commit 69b3d3b

Browse files
check if playing before dispose
1 parent 9495936 commit 69b3d3b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Assets/MixedRealityToolkit/_Core/Devices/VoiceInput/WindowsDictationInputDeviceManager.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ public override async void Disable()
120120

121121
public override void Destroy()
122122
{
123-
dictationRecognizer?.Dispose();
123+
if (Application.isPlaying)
124+
{
125+
dictationRecognizer?.Dispose();
126+
}
124127
}
125128

126129
/// <inheritdoc />

0 commit comments

Comments
 (0)