From 6d377aea7bd97168301428203710878f30356110 Mon Sep 17 00:00:00 2001 From: ZeldaZach Date: Sat, 28 Dec 2024 22:01:41 -0500 Subject: [PATCH] Fix Crash on Win Portable --- cockatrice/src/dialogs/dlg_settings.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cockatrice/src/dialogs/dlg_settings.cpp b/cockatrice/src/dialogs/dlg_settings.cpp index 978b1bfd0..b3d6ca072 100644 --- a/cockatrice/src/dialogs/dlg_settings.cpp +++ b/cockatrice/src/dialogs/dlg_settings.cpp @@ -118,9 +118,11 @@ GeneralSettingsPage::GeneralSettingsPage() QPushButton *tokenDatabasePathButton = new QPushButton("..."); connect(tokenDatabasePathButton, SIGNAL(clicked()), this, SLOT(tokenDatabasePathButtonClicked())); + // Required init here to avoid crashing on Portable builds resetAllPathsButton = new QPushButton; - bool isPortable = settings.getIsPortableBuild(); + + bool isPortable = true; // settings.getIsPortableBuild(); if (isPortable) { deckPathEdit->setEnabled(false); replaysPathEdit->setEnabled(false); @@ -303,9 +305,7 @@ void GeneralSettingsPage::retranslateUi() updateNotificationCheckBox.setText(tr("Notify if a feature supported by the server is missing in my client")); newVersionOracleCheckBox.setText(tr("Automatically run Oracle when running a new version of Cockatrice")); showTipsOnStartup.setText(tr("Show tips on startup")); - if (resetAllPathsButton) { - resetAllPathsButton->setText(tr("Reset all paths")); - } + resetAllPathsButton->setText(tr("Reset all paths")); const auto &settings = SettingsCache::instance();