From de95680bcef1f009f4f1ea5154a1c4d056c9eefb Mon Sep 17 00:00:00 2001 From: fundamental Date: Wed, 17 Aug 2016 16:27:57 -0400 Subject: [PATCH] WaveEngine: Fix Possible Null Pointer Deref --- src/Nio/WavEngine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Nio/WavEngine.cpp b/src/Nio/WavEngine.cpp index d223bc7c..42489cc5 100644 --- a/src/Nio/WavEngine.cpp +++ b/src/Nio/WavEngine.cpp @@ -119,7 +119,8 @@ void *WavEngine::AudioThread() -32768, 32767); } - file->writeStereoSamples(synth.buffersize, recordbuf_16bit); + if(file) + file->writeStereoSamples(synth.buffersize, recordbuf_16bit); } delete[] recordbuf_16bit; -- 2.11.4.GIT