Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix presets failing to load as it was trying to load a null element. #96

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading