ra2yrcpp
ra2yrcpp copied to clipboard
std::out_of_range when accessing SaveTrafficData object
ServiceData objects are deinitialized in ExitGameLoop hook: https://github.com/shmocz/ra2yrcpp/blob/21491da68f2ba8d0a8dff0d9b175b9fd3b98e69b/src/hooks_yr.cpp#L388-L400
However, calls to TunnelSendTo and TunnelRecvFrom are still happening, causing std::out_of_range to be thrown in the respective hooks.
Solution is to perform ServiceData deinitialization elsewhere when tunnel related recvs/sends are no longer occurring.