Crash on shutting down FRunableThread; Access violation

Hello there,

I have been working on a AI plugin which uses mutli threading, the problem is that the code for now runs great, BUT crashes when I try to shut down a thread. I have been looking in my code for litterly weeks and I still can’t find it. Which makes me start to believe there might be a bug.

Here are the files that may help to see what is going wrong:

Again the code works (still have to work on it but it is doing what it is suposed to for now), but it crashes when I try to shut down a thread from the gamemodes destructor.

Also the crash reports says it is access violation.

Any help would be very much apreciated.