The code I just wrote smells (but works correctly and without presenting warning messages), but the alternatives I can think of all look worse.
So I tried cleaning this code up and now the program crashes instead of working UNLESS there's a debugger attached, at which point everything works perfectly.
Fixed. Uninitialized member. Was getting set to nullptr with a debugger attached but not without.
This is a lot better now. Not perfect, but I was able to delete a ton of code that didn't need to exist.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!
So I tried cleaning this code up and now the program crashes instead of working UNLESS there's a debugger attached, at which point everything works perfectly.