From e43f126b03539c9d46e7712af9268505f256a898 Mon Sep 17 00:00:00 2001 From: Tannin Date: Thu, 19 Dec 2013 20:30:39 +0100 Subject: - bugfix: crash on overwriting a mod (introduced after the previous release) - bugfix: ncc installer now brings the installer window to front (again? more reliably? not sure if it really worked before) --- src/installationmanager.cpp | 4 +++- src/installationmanager.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 07c015ea..e6e660e6 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -440,7 +440,9 @@ bool InstallationManager::testOverwrite(GuessedValue &modName, bool *me return false; } } - *merge = (overwriteDialog.action() == QueryOverwriteDialog::ACT_MERGE); + if (merge != nullptr) { + *merge = (overwriteDialog.action() == QueryOverwriteDialog::ACT_MERGE); + } if (overwriteDialog.action() == QueryOverwriteDialog::ACT_RENAME) { bool ok = false; QString name = QInputDialog::getText(m_ParentWidget, tr("Mod Name"), tr("Name"), diff --git a/src/installationmanager.h b/src/installationmanager.h index b25ea957..3478fecf 100644 --- a/src/installationmanager.h +++ b/src/installationmanager.h @@ -138,6 +138,7 @@ public: /** * @brief test if the specified mod name is free. If not, query the user how to proceed * @param modName current possible names for the mod + * @param merge if this value is not null, the value will be set to whether the use chose to merge or replace * @return true if we can proceed with the installation, false if the user canceled or in case of an unrecoverable error */ virtual bool testOverwrite(MOBase::GuessedValue &modName, bool *merge = NULL) const; -- cgit v1.3.1