1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-23 04:57:44 +00:00

Fix crash due to bad deref

This commit is contained in:
Joshua Goins 2022-07-20 11:45:29 -04:00
parent 01e05ca887
commit 0b9f46674f
2 changed files with 8 additions and 8 deletions

View file

@ -77,7 +77,7 @@ void SquareBoot::bootCheck(const LoginInformation& info) {
dialog->setValue(recieved); dialog->setValue(recieved);
}); });
connect(patchReply, &QNetworkReply::finished, [&] { connect(patchReply, &QNetworkReply::finished, [=, &info] {
const QString dataDir = const QString dataDir =
QStandardPaths::writableLocation(QStandardPaths::TempLocation); QStandardPaths::writableLocation(QStandardPaths::TempLocation);

View file

@ -260,11 +260,11 @@ LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindo
connect(core.assetUpdater, &AssetUpdater::finishedUpdating, [=] { connect(core.assetUpdater, &AssetUpdater::finishedUpdating, [=] {
auto& profile = currentProfile(); auto& profile = currentProfile();
LoginInformation info; LoginInformation* info = new LoginInformation();
info.settings = &profile; info->settings = &profile;
info.username = usernameEdit->text(); info->username = usernameEdit->text();
info.password = passwordEdit->text(); info->password = passwordEdit->text();
info.oneTimePassword = otpEdit->text(); info->oneTimePassword = otpEdit->text();
#ifndef QT_DEBUG #ifndef QT_DEBUG
if(currentProfile().rememberUsername) { if(currentProfile().rememberUsername) {
@ -285,9 +285,9 @@ LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindo
#endif #endif
if(currentProfile().isSapphire) { if(currentProfile().isSapphire) {
this->core.sapphireLauncher->login(currentProfile().lobbyURL, info); this->core.sapphireLauncher->login(currentProfile().lobbyURL, *info);
} else { } else {
this->core.squareBoot->checkGateStatus(&info); this->core.squareBoot->checkGateStatus(info);
} }
}); });