Skip to content

Commit

Permalink
Fix crash upon logging a null keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 committed Oct 15, 2022
1 parent b79bd86 commit fbf2ac9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion SPID/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.20)
set(NAME "po3_SpellPerkItemDistributor" CACHE STRING "")
set(VERSION 6.0.1 CACHE STRING "")
set(VERSION 6.0.2 CACHE STRING "")
set(AE_VERSION 1)

# ---- Options ----
Expand Down
11 changes: 6 additions & 5 deletions SPID/include/LookupForms.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,12 @@ namespace Lookup
}
if (!form) {
logger::error(" [0x{:X}] ({}) FAIL - formID doesn't exist", *formID, modName.value_or(""));
}
if constexpr (std::is_same_v<Form, RE::BGSKeyword>) {
if (string::is_empty(form->GetFormEditorID())) {
form = nullptr;
logger::error(" [0x{:X}] ({}) FAIL - keyword does not have a valid editorID", *formID, modName.value_or(""));
} else {
if constexpr (std::is_same_v<Form, RE::BGSKeyword>) {
if (string::is_empty(form->GetFormEditorID())) {
form = nullptr;
logger::error(" [0x{:X}] ({}) FAIL - keyword does not have a valid editorID", *formID, modName.value_or(""));
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion SPID/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spid",
"version-string": "6.0.1",
"version-string": "6.0.2",
"description": "Spell Perk Item Distributor",
"homepage": "https://github.com/powerof3/Spell-Perk-Item-Distributor",
"license": "MIT",
Expand Down

0 comments on commit fbf2ac9

Please sign in to comment.