It doesn’t matter where it gets called from. Also they were static functions so it’s equivalent to the free-functions I wrote above. Maybe them being a member function (__thiscall) would make the bug not appear. The error i get is “Access violation reading location 0xFFFFFFFF”