Commit 99615c39 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix crash on timeline clip deletion

parent dbc97f19
...@@ -265,7 +265,10 @@ void EffectStackView::loadEffects() ...@@ -265,7 +265,10 @@ void EffectStackView::loadEffects()
void EffectStackView::updateTreeHeight() void EffectStackView::updateTreeHeight()
{ {
// For some reason, the treeview height does not update correctly, so enforce it // For some reason, the treeview height does not update correctly, so enforce it
m_mutex.lock(); QMutexLocker lk(&m_mutex);
if (!m_model) {
return;
}
int totalHeight = 0; int totalHeight = 0;
for (int j = 0; j < m_model->rowCount(); j++) { for (int j = 0; j < m_model->rowCount(); j++) {
std::shared_ptr<AbstractEffectItem> item2 = m_model->getEffectStackRow(j); std::shared_ptr<AbstractEffectItem> item2 = m_model->getEffectStackRow(j);
...@@ -277,7 +280,6 @@ void EffectStackView::updateTreeHeight() ...@@ -277,7 +280,6 @@ void EffectStackView::updateTreeHeight()
} }
} }
m_effectsTree->setFixedHeight(totalHeight); m_effectsTree->setFixedHeight(totalHeight);
m_mutex.unlock();
m_scrollTimer.start(); m_scrollTimer.start();
} }
......
Markdown is supported
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