diff -up TnL-source-071111/src/game.cc~ TnL-source-071111/src/game.cc --- TnL-source-071111/src/game.cc~ 2007-11-11 16:38:40.000000000 +0100 +++ TnL-source-071111/src/game.cc 2007-11-11 16:38:40.000000000 +0100 @@ -352,6 +352,10 @@ void Game::teardownSystem(Status & stat) ls_message("Exiting game.\n"); stat.endJob(); + + /* ugly but necessary, because otherwise Ptr<> will call unref on us after + destruction in the case the constructor failed */ + exit(1); } void Game::startupSimulation(Status & stat) {