# HG changeset patch # User Wuzzy # Date 1521462913 -3600 # Node ID 5200231eb12082206ffb866a9f9b89ad67042190 # Parent edb2f654f8f62a5b0c6d2636477964df4ec04a43 Check existance of theme icon before loading it diff -r edb2f654f8f6 -r 5200231eb120 QTfrontend/model/ThemeModel.cpp --- a/QTfrontend/model/ThemeModel.cpp Mon Mar 19 00:09:07 2018 +0100 +++ b/QTfrontend/model/ThemeModel.cpp Mon Mar 19 13:35:13 2018 +0100 @@ -145,8 +145,12 @@ dataset.insert(Qt::DisplayRole, (isDLC ? "*" : "") + theme); // load and set preview icon - QIcon preview(QString("physfs://Themes/%1/icon@2x.png").arg(theme)); - dataset.insert(Qt::DecorationRole, preview); + iconpath = QString("physfs://Themes/%1/icon@2x.png").arg(theme); + if (QFile::exists(iconpath)) + { + QIcon preview(QString("physfs://Themes/%1/icon@2x.png").arg(theme)); + dataset.insert(Qt::DecorationRole, preview); + } m_data.append(dataset); }