Skip to content

Commit

Permalink
fix nullptr, remove addon minreqs unload
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaGW2 committed Nov 16, 2023
1 parent 45fd0de commit 9b013f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 7 additions & 4 deletions src/GUI/Widgets/Debug/DebugWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 1 addition & 2 deletions src/Loader/AddonDefinition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ bool AddonDefinition::HasMinimumRequirements()
Name &&
Author &&
Description &&
Load &&
(HasFlag(EAddonFlags::DisableHotloading) || Unload))
Load)
{
return true;
}
Expand Down

0 comments on commit 9b013f8

Please sign in to comment.