mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
fix: Settings sometimes being reset on shutdown
This commit is contained in:
@@ -128,7 +128,10 @@ namespace hex {
|
||||
}
|
||||
|
||||
void store() {
|
||||
const auto &settingsData = getSettingsData();
|
||||
if (!s_settings.isValid())
|
||||
return;
|
||||
|
||||
const auto &settingsData = *s_settings;
|
||||
|
||||
// During a crash settings can be empty, causing them to be overwritten.
|
||||
if (settingsData.empty()) {
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace hex {
|
||||
}
|
||||
|
||||
void clearSelection() {
|
||||
impl::s_currentSelection.reset();
|
||||
impl::s_currentSelection->reset();
|
||||
}
|
||||
|
||||
void setSelection(const Region ®ion, prv::Provider *provider) {
|
||||
|
||||
@@ -134,8 +134,8 @@ namespace hex {
|
||||
}
|
||||
|
||||
void LayoutManager::reset() {
|
||||
s_layoutPathToLoad.reset();
|
||||
s_layoutStringToLoad.reset();
|
||||
s_layoutPathToLoad->reset();
|
||||
s_layoutStringToLoad->reset();
|
||||
s_layouts->clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user