In this case a screen re-paint message could come in after the main frame had been closed.
The fix is to simply ignore the re-paint message in this case.
This was a regression from FMSlogo 7.7.0. I don't know what caused it, but it might be that updating wxWidgets changed something subtle in the way it handles messages.