aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-08-21 23:04:45 +0200
committerGitHub <noreply@github.com>2023-08-21 23:04:45 +0200
commitb1783d8fb1bf84a0c12412dd3499175a9e597a95 (patch)
treed75406694249247fb09cbe37dfd26b617e660d23
parentfff378b643dfb4403c2994bbb47976263b146c20 (diff)
parentc3d03f0c3392051a845be5afeef246d386e0ca18 (diff)
downloadPrismLauncher-b1783d8fb1bf84a0c12412dd3499175a9e597a95.tar.gz
PrismLauncher-b1783d8fb1bf84a0c12412dd3499175a9e597a95.tar.bz2
PrismLauncher-b1783d8fb1bf84a0c12412dd3499175a9e597a95.zip
Merge pull request #1557 from Trial97/curse_crash
-rw-r--r--launcher/ui/MainWindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index 780147ef..cbfd4b9a 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -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];