fix a crash when quit from game to mainwindow
fix a compile-stopper on debug-build
add some Q_ASSERT, which should have no effect on any game logic and works only in debug mode