prevent crash if mic init fails

This commit is contained in:
StapleButter 2018-12-16 14:18:59 +01:00
parent 3f26fbddc0
commit a99ebf38db
1 changed files with 1 additions and 0 deletions

View File

@ -318,6 +318,7 @@ void FeedMicInput()
{ {
int type = Config::MicInputType; int type = Config::MicInputType;
if ((type != 1 && MicCommand == 0) || if ((type != 1 && MicCommand == 0) ||
(type == 1 && MicBufferLength == 0) ||
(type == 3 && MicWavBuffer == NULL)) (type == 3 && MicWavBuffer == NULL))
{ {
type = 0; type = 0;