fix add resource with no instance

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2025-01-31 22:03:57 +02:00
parent a639bc019e
commit c5efe081b4
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318

View File

@ -1027,6 +1027,14 @@ void MainWindow::processURLs(QList<QUrl> urls)
continue;
}
if (APPLICATION->instances()->count() <= 0) {
CustomMessageBox::selectable(this, tr("No instance!"),
tr("No instance available to add the resource to.\nPlease create a new instance before "
"attempting to install this resource again."),
QMessageBox::Critical)
->show();
continue;
}
ImportResourceDialog dlg(localFileName, type, this);
if (dlg.exec() != QDialog::Accepted)