Fixed the crash happening when cancelling the Ogre config dialog.

Fixes #272