mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Merge pull request #2959 from PrismLauncher/backport-2954-to-release-9.x
[Backport release-9.x] do not try to import skin if path is empty
This commit is contained in:
commit
25eaa4eba6
1 changed files with 3 additions and 0 deletions
|
|
@ -139,6 +139,9 @@ void SkinManageDialog::on_fileBtn_clicked()
|
|||
{
|
||||
auto filter = QMimeDatabase().mimeTypeForName("image/png").filterString();
|
||||
QString raw_path = QFileDialog::getOpenFileName(this, tr("Select Skin Texture"), QString(), filter);
|
||||
if (raw_path.isNull()) {
|
||||
return;
|
||||
}
|
||||
auto message = m_list.installSkin(raw_path, {});
|
||||
if (!message.isEmpty()) {
|
||||
CustomMessageBox::selectable(this, tr("Selected file is not a valid skin"), message, QMessageBox::Critical)->show();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue