fix: fix potentially uninitialized variable
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
0a04c3a2a7
commit
5be9472912
@ -262,7 +262,7 @@ void ModPage::openUrl(const QUrl& url)
|
|||||||
|
|
||||||
const QString address = url.host() + url.path();
|
const QString address = url.host() + url.path();
|
||||||
QRegularExpressionMatch match;
|
QRegularExpressionMatch match;
|
||||||
const char* page;
|
QString page;
|
||||||
|
|
||||||
match = modrinth.match(address);
|
match = modrinth.match(address);
|
||||||
if (match.hasMatch())
|
if (match.hasMatch())
|
||||||
@ -276,7 +276,7 @@ void ModPage::openUrl(const QUrl& url)
|
|||||||
page = "curseforge";
|
page = "curseforge";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match.hasMatch()) {
|
if (!page.isNull()) {
|
||||||
const QString slug = match.captured(1);
|
const QString slug = match.captured(1);
|
||||||
|
|
||||||
// ensure the user isn't opening the same mod
|
// ensure the user isn't opening the same mod
|
||||||
|
Loading…
Reference in New Issue
Block a user