From 9b013f864d0b08e05f24a44dddcb312eed5156a5 Mon Sep 17 00:00:00 2001 From: Delta <46466697+DeltaGW2@users.noreply.github.com> Date: Fri, 17 Nov 2023 00:43:57 +0100 Subject: [PATCH] fix nullptr, remove addon minreqs unload --- src/GUI/Widgets/Debug/DebugWindow.cpp | 11 +++++++---- src/Loader/AddonDefinition.cpp | 3 +-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/GUI/Widgets/Debug/DebugWindow.cpp b/src/GUI/Widgets/Debug/DebugWindow.cpp index 83836b1..680b435 100644 --- a/src/GUI/Widgets/Debug/DebugWindow.cpp +++ b/src/GUI/Widgets/Debug/DebugWindow.cpp @@ -262,11 +262,14 @@ namespace GUI ImGui::TextDisabled("Module Size: %u", addon->ModuleSize); ImGui::TextDisabled("AddonDefs: %p", addon->Definitions); - if (ImGui::SmallButton("Memory Editor")) + if (addon->Definitions != nullptr) { - memEditor.Open = true; - memPtr = addon->Definitions; - memSz = sizeof(AddonDefinition); + if (ImGui::SmallButton("Memory Editor")) + { + memEditor.Open = true; + memPtr = addon->Definitions; + memSz = sizeof(AddonDefinition); + } } ImGui::TreePop(); diff --git a/src/Loader/AddonDefinition.cpp b/src/Loader/AddonDefinition.cpp index 0c992ef..f9632a2 100644 --- a/src/Loader/AddonDefinition.cpp +++ b/src/Loader/AddonDefinition.cpp @@ -31,8 +31,7 @@ bool AddonDefinition::HasMinimumRequirements() Name && Author && Description && - Load && - (HasFlag(EAddonFlags::DisableHotloading) || Unload)) + Load) { return true; }