Sorry for asking the question, I'm calling
err->Delete()
twice (not visible in the question itself) . Understandably, I rather would like to draw back the question.
Anyway, when looking at the Delete() code:
void CException::Delete()
{
if (m_bAutoDelete > 0)
{
#ifdef _DEBUG
m_bReadyForDelete = TRUE;
#endif
delete this;
}
}
m_bAutoDelete is just a random number after the first call to err->Delete(), so chances are 1:1 that the deletion is tried a second time if Delete() is to be called again.
On my development system, it was always a negative not causing the exception. On another system,
m_bAutoDelete
resolved to true and bang.