Commit 2992e8b9 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Make sure we don't provide null packages

Sometimes, apparently, some packages aren't listed when all Application
instances are created. This would become a crash in some special
situations, especially the cases where the architecture of the package
is specified as a suffix to the package name (e.g. primus-libs-ia32).

This patch fixes that crash by not reporting these, but then we still
have the problem that these won't be listed as updates.

CCBUG: 327544
parent 7df0e472
......@@ -465,10 +465,12 @@ void ApplicationUpdates::calculateUpdates()
AbstractResource* res = m_appBackend->resourceByPackageName(it->name());
if(!res) //If we couldn't find it by its name, try with
res = m_appBackend->resourceByPackageName(QString("%1:%2").arg(it->name()).arg(it->architecture()));
m_toUpdate += res;
qWarning() << "Couldn't find the package:" << it->name();
m_toUpdate += res;
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