On Friday, 7 June 2019 at 16:09:47 UTC, Adam D. Ruppe wrote: >> It happens when I close down my app. > > is this inside a destructor? No, it's in an external thread(it is in a callback). All I can think of is that something is happening in between the two checks since there is no way it could happen otherwise.