Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -397,9 +397,11 @@ OpenSLLayer::stopAudioCapture() ...@@ -397,9 +397,11 @@ OpenSLLayer::stopAudioCapture()
{ {
std::lock_guard<std::mutex> lck(recMtx); std::lock_guard<std::mutex> lck(recMtx);
if (recorder_) {
recorder_->stop(); recorder_->stop();
recorder_.reset(); recorder_.reset();
} }
}
if (recThread.joinable()) { if (recThread.joinable()) {
recCv.notify_all(); recCv.notify_all();
recThread.join(); recThread.join();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment