Crash fixes

This commit is contained in:
Grinch_ 2022-07-05 02:32:03 +06:00
parent b73ab2eec0
commit a477cf29da

View File

@ -555,11 +555,11 @@ bool Widget::Checkbox(const char* label, bool* v, const char* hint, bool is_disa
bool Widget::CheckboxAddr(const char* label, uint addr, const char* hint) bool Widget::CheckboxAddr(const char* label, uint addr, const char* hint)
{ {
bool rtn = false; bool rtn = false;
bool state = patch::Get<bool>(addr, false); bool state = patch::Get<bool>(addr);
if (Checkbox(label, &state, hint) && addr != NULL) if (Checkbox(label, &state, hint) && addr != NULL)
{ {
patch::Set<bool>(addr, state, false); patch::Set<bool>(addr, state);
rtn = true; rtn = true;
} }