Skip to content
Snippets Groups Projects
Commit fe7140cb authored by Sébastien Blin's avatar Sébastien Blin
Browse files

avmodel: avoid incorrect iterator

Change-Id: I6e94fc7017a356212a13f6b0fcb0e4cf64abdaaa
parent 2feead16
No related branches found
No related tags found
No related merge requests found
......@@ -296,7 +296,8 @@ AVModel::setDeviceSettings(video::Settings& settings)
// doing this during a call will cause re-invite, this is unwanted
std::unique_lock<std::mutex> lk(pimpl_->renderers_mtx_);
auto it = pimpl_->renderers_.find(video::PREVIEW_RENDERER_ID);
if (it->second && it->second->isRendering() && pimpl_->renderers_.size() == 1) {
if (it != pimpl_->renderers_.end() && it->second && it->second->isRendering()
&& pimpl_->renderers_.size() == 1) {
lk.unlock();
stopPreview(video::PREVIEW_RENDERER_ID);
startPreview(video::PREVIEW_RENDERER_ID);
......@@ -877,9 +878,9 @@ AVModelPimpl::removeRenderer(const QString& id)
return;
}
disconnect(search->second.get(),
&video::Renderer::frameUpdated,
this,
&AVModelPimpl::slotFrameUpdated);
&video::Renderer::frameUpdated,
this,
&AVModelPimpl::slotFrameUpdated);
connect(
search->second.get(),
&video::Renderer::stopped,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment