Commit f3ab5eee authored by Dan Leinir Turthra Jensen's avatar Dan Leinir Turthra Jensen 🌈
Browse files

Avoid some asserts on potentially iffy data

parent 5df94ecc
......@@ -162,9 +162,9 @@ QVariant AccountsModel::data(const QModelIndex& index, int role) const
break;
case IconNameRole:
{
QString iconName = account->provider().iconName();
if (iconName.isEmpty()) {
iconName = QString("unknown");
QString iconName{"unknown"};
if (account->provider().isValid() && !account->provider().iconName().isEmpty()) {
iconName = account->provider().iconName();
}
data.setValue(iconName);
break;
......
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