diff options
author | StapleButter <thetotalworm@gmail.com> | 2018-12-16 14:18:59 +0100 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2018-12-16 14:18:59 +0100 |
commit | a99ebf38db2dbdd76e3347441a5aa5a3de05b873 (patch) | |
tree | e9423e3e593400ec91350b5b211f53b12d9d01d3 | |
parent | 3f26fbddc028260f6cd824693816d0a6a3e9081a (diff) |
prevent crash if mic init fails
-rw-r--r-- | src/libui_sdl/main.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp index 6cdfe7a..84bbb94 100644 --- a/src/libui_sdl/main.cpp +++ b/src/libui_sdl/main.cpp @@ -318,6 +318,7 @@ void FeedMicInput() { int type = Config::MicInputType; if ((type != 1 && MicCommand == 0) || + (type == 1 && MicBufferLength == 0) || (type == 3 && MicWavBuffer == NULL)) { type = 0; |