Well, like I said, the modified code is not executed at all under normal conditions.
The extra code only runs if the boolean variable
deleted is
true. It is initialised to
false in the constructor, and it can only legally become true if the
Delete() function is called (which obviously is not the case, otherwise you could not build Code::Blocks prior to the re-revert, it would yield undefined symbols).
Thus, it is my assumption that the "bug" comes simply from mixing old and new components. Old code would not know about that data member and would not have a constructor that initialises it, obviously. Thus, the value would be undefined (most likely not zero) and this sure would crash.
But again... I was planning on working on this class to remove the race condition that can occur in one situation, so there was actually a way to safely abort jobs (which I thought might be a good thing). So I was starting from the previously committed version.
However, if this causes so much trouble, then just screw it... revert the modifications, and leave it
We'll not have the ability to abort jobs then, but so what...