QTfrontend/model/ThemeModel.cpp
changeset 13252 5200231eb120
parent 13249 d2b58cf339fe
child 13267 48b23e6f26d9
--- 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);
     }