Commit fe421624 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Make sure we don't call m_updates if it's null

parent 73d460c2
......@@ -85,10 +85,12 @@ void UpdateModel::resourceHasProgressed(AbstractResource* res, qreal progress)
void UpdateModel::activityChanged()
{
if (m_updates && !m_updates->isProgressing()) {
m_updates->prepare();
if (m_updates) {
if (!m_updates->isProgressing()) {
m_updates->prepare();
}
setResources(m_updates->toUpdate());
}
setResources(m_updates->toUpdate());
}
QVariant UpdateModel::data(const QModelIndex &index, int role) const
......
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