From fbf2ac9645462add324e0889a87e3d50b939d141 Mon Sep 17 00:00:00 2001 From: powerof3 <32599957+powerof3@users.noreply.github.com> Date: Sat, 15 Oct 2022 19:56:52 +0530 Subject: [PATCH] Fix crash upon logging a null keyword --- SPID/CMakeLists.txt | 2 +- SPID/include/LookupForms.h | 11 ++++++----- SPID/vcpkg.json | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/SPID/CMakeLists.txt b/SPID/CMakeLists.txt index 3630fdb..51a9f98 100644 --- a/SPID/CMakeLists.txt +++ b/SPID/CMakeLists.txt @@ -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 ---- diff --git a/SPID/include/LookupForms.h b/SPID/include/LookupForms.h index ddaf4bd..259109b 100644 --- a/SPID/include/LookupForms.h +++ b/SPID/include/LookupForms.h @@ -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) { - 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) { + if (string::is_empty(form->GetFormEditorID())) { + form = nullptr; + logger::error(" [0x{:X}] ({}) FAIL - keyword does not have a valid editorID", *formID, modName.value_or("")); + } } } } diff --git a/SPID/vcpkg.json b/SPID/vcpkg.json index 8155f88..08c2beb 100644 --- a/SPID/vcpkg.json +++ b/SPID/vcpkg.json @@ -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",