zinnschlag/openmw — pull request #195 by scrawl (2012-05-04 14:16:28+00:00)
Title: fix exceptions that cause the game to quit not being printed

Since the switch to environment singleton, there is an issue that exceptions causing the game to quit are not printed anymore, making it impossible to say what the problem is. The problem is that Engine is declared inside the try-catch block in main.cpp. Thus, when an exception is raised, the Engine destructor will be called _before_ the exception is printed - and because the singleton assertions in the Engine destructor can fail if it wasn't initialised completely, this will cause the exception not to be printed at all.

To fix this, I've simply moved the engine declaration outside of the try-catch block.