Unverified Commit 301d9af8 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

audio: protect recorder_->stop() from null pointer exception

Change-Id: Ibb7ed1c76dafc7368655b0751f94a4b0df6a531d
parent 69ffe0b2
......@@ -397,8 +397,10 @@ OpenSLLayer::stopAudioCapture()
{
std::lock_guard<std::mutex> lck(recMtx);
recorder_->stop();
recorder_.reset();
if (recorder_) {
recorder_->stop();
recorder_.reset();
}
}
if (recThread.joinable()) {
recCv.notify_all();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment