diff --git a/src/libs/rtdhook/rtdhook.hpp b/src/libs/rtdhook/rtdhook.hpp index 03e157a..81e098c 100644 --- a/src/libs/rtdhook/rtdhook.hpp +++ b/src/libs/rtdhook/rtdhook.hpp @@ -134,9 +134,10 @@ class rtdhook_vmt { */ ~rtdhook_vmt() { - for (auto& method : mHookedList) + for (auto ptr = mHookedList.begin(); ptr < mHookedList.end();) { - uninstall(method.id); + rewrite_pointer(ptr->id, ptr->original); + ptr = mHookedList.erase(ptr); } }