Even safer handling of these ugly Qt issues with crashing on exit...
It turns out that the scene selectionChanged event still fires as the
scene is starting to dispose of itself, so clear the selection first...