thanks Rayman.
I added some error-checking functionality. I need to add a little more
which should cover another situation:
If you add a couple items to the scene, then delete them all, there is still a valid selection.
The data is removed from the *Scene*, but is still available in the Undo Stack.
If you then select the OBJ export icon and proceed to export, you still get the crash. Why?
Because the selection pointer is still valid, and the code tries to process that selection.
Since the selection is no longer in the scene, we get the crash.
The solution is to traverse the parent node path of the selection, until we hit the scene node (IRnScene).
If we traverse the whole path, without reaching the scene node, then the selection no longer exists
in the scene, so I then need to show an error window and abort gracefully (not crash! )
So I will add that in.