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