Skip to content

Commit

Permalink
Fix presets failing to load as it was trying to load a null element. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
PhlexPlexico authored Jun 3, 2024
1 parent fde3495 commit 2c8673a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/preset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,8 @@ bool LoadPreset(std::string_view presetName, OptionCategory category) {
if (!setting->IsCategory(category)) {
continue;
} else if (!curNode->GetText()) {
continue;
curNode->SetText("");
}

// Since presets are saved linearly, we can simply loop through the nodes as
// we loop through the settings to find most of the matching elements.
const std::string& settingToFind = RemoveLineBreaks(setting->GetName());
Expand Down

0 comments on commit 2c8673a

Please sign in to comment.