Fix Exception in Console, when loading ptr null

This commit is contained in:
RyujinZX 2022-07-27 14:14:09 +03:00
parent 38aa983539
commit f0ae3753f9

View File

@ -1358,6 +1358,12 @@ namespace cheat::feature
if (_monoMiniMap == nullptr) if (_monoMiniMap == nullptr)
return false; return false;
// Fix Exception in Console, when loading ptr null | RyujinZX#7832
if (_monoMiniMap->fields._._._._.m_CachedPtr == 0) {
_monoMiniMap = nullptr;
return false;
}
SAFE_BEGIN(); SAFE_BEGIN();
return app::Behaviour_get_isActiveAndEnabled(reinterpret_cast<app::Behaviour*>(_monoMiniMap), nullptr); return app::Behaviour_get_isActiveAndEnabled(reinterpret_cast<app::Behaviour*>(_monoMiniMap), nullptr);
SAFE_ERROR(); SAFE_ERROR();