diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-11-14 21:20:38 +0100 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-11-14 21:20:38 +0100 |
commit | 5be947291285fc8ed10852b54a647ecd338d645d (patch) | |
tree | e501c71e146ac3c03b87705dc932cf5e659c492e /launcher/ui/pages | |
parent | 0a04c3a2a77bda4e60d04f651c7ab5006ee02449 (diff) | |
download | PrismLauncher-5be947291285fc8ed10852b54a647ecd338d645d.tar.gz PrismLauncher-5be947291285fc8ed10852b54a647ecd338d645d.tar.bz2 PrismLauncher-5be947291285fc8ed10852b54a647ecd338d645d.zip |
fix: fix potentially uninitialized variable
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/ui/pages')
-rw-r--r-- | launcher/ui/pages/modplatform/ModPage.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/launcher/ui/pages/modplatform/ModPage.cpp b/launcher/ui/pages/modplatform/ModPage.cpp index 234f9f36..677bc4d6 100644 --- a/launcher/ui/pages/modplatform/ModPage.cpp +++ b/launcher/ui/pages/modplatform/ModPage.cpp @@ -262,7 +262,7 @@ void ModPage::openUrl(const QUrl& url) const QString address = url.host() + url.path(); QRegularExpressionMatch match; - const char* page; + QString page; match = modrinth.match(address); if (match.hasMatch()) @@ -276,7 +276,7 @@ void ModPage::openUrl(const QUrl& url) page = "curseforge"; } - if (match.hasMatch()) { + if (!page.isNull()) { const QString slug = match.captured(1); // ensure the user isn't opening the same mod |