Skip to content

Commit

Permalink
Merge pull request #1557 from Trial97/curse_crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrumplex committed Aug 21, 2023
2 parents fff378b + c3d03f0 commit b1783d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions launcher/ui/MainWindow.cpp
Expand Up @@ -932,6 +932,11 @@ void MainWindow::processURLs(QList<QUrl> urls)
// format of url curseforge://install?addonId=IDHERE&fileId=IDHERE
QUrlQuery query(url);

if (query.allQueryItemValues("addonId").isEmpty() || query.allQueryItemValues("fileId").isEmpty()) {
qDebug() << "Invalid curseforge link:" << url;
continue;
}

auto addonId = query.allQueryItemValues("addonId")[0];
auto fileId = query.allQueryItemValues("fileId")[0];

Expand Down

0 comments on commit b1783d8

Please sign in to comment.