Commit 1b0992a5 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Make sure we don't crash

Fixes running Discover against KObjectTracker, doubt it has an impact on
regular usage.
parent a5200c3b
......@@ -318,7 +318,7 @@ UpdateItem * UpdateModel::itemFromResource(AbstractResource* res)
QString UpdateModel::updateSize() const
{
return KFormat().formatByteSize(m_updates->updateSize());
return m_updates ? KFormat().formatByteSize(m_updates->updateSize()) : QString();
}
QModelIndex UpdateModel::indexFromItem(UpdateItem* item) const
......
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