mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-13 13:47:46 +02:00
Add more null protection for skin management
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -336,7 +336,11 @@ void SkinList::save()
|
||||
arr << s.toJSON();
|
||||
}
|
||||
doc["skins"] = arr;
|
||||
Json::write(doc, m_dir.absoluteFilePath("index.json"));
|
||||
try {
|
||||
Json::write(doc, m_dir.absoluteFilePath("index.json"));
|
||||
} catch (const FS::FileSystemException& e) {
|
||||
qCritical() << "Failed to write skin index file :" << e.cause();
|
||||
}
|
||||
}
|
||||
|
||||
int SkinList::getSelectedAccountSkin()
|
||||
|
@ -41,7 +41,7 @@ SkinModel::SkinModel(QDir skinDir, QJsonObject obj)
|
||||
|
||||
QString SkinModel::name() const
|
||||
{
|
||||
return QFileInfo(m_path).baseName();
|
||||
return QFileInfo(m_path).completeBaseName();
|
||||
}
|
||||
|
||||
bool SkinModel::rename(QString newName)
|
||||
|
Reference in New Issue
Block a user