Skip to content

Commit

Permalink
Merge pull request PrismLauncher#2954 from Trial97/skin_warn
Browse files Browse the repository at this point in the history
do not try to import skin if path is empty
  • Loading branch information
Trial97 authored Oct 21, 2024
2 parents 671d527 + 6902896 commit a43ebef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions launcher/ui/dialogs/skins/SkinManageDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a43ebef

Please sign in to comment.