diff --git a/loader/include/Geode/modify/Modify.hpp b/loader/include/Geode/modify/Modify.hpp index e2ed7c85..925b6757 100644 --- a/loader/include/Geode/modify/Modify.hpp +++ b/loader/include/Geode/modify/Modify.hpp @@ -13,6 +13,12 @@ if constexpr (Unique::different< \ Resolve<__VA_ARGS__>::func(&Base::FunctionName_), \ Resolve<__VA_ARGS__>::func(&Derived::FunctionName_)>()) { \ + if (address() == 0) { \ + log::error( \ + "Address of {} returned nullptr, can't hook", #ClassName_ "::" #FunctionName_ \ + ); \ + break; \ + } \ auto hook = Hook::create( \ Mod::get(), \ reinterpret_cast(address()), \ @@ -106,7 +112,11 @@ namespace geode::modifier { class ModifyDerive { public: ModifyDerive() { - static_assert(alwaysFalse, "Modified class not recognized, please include to be able to use it."); + static_assert( + alwaysFalse, + "Modified class not recognized, please include to be " + "able to use it." + ); } }; }