@@ -70,15 +70,17 @@ PyObject* omegaExit(PyObject* self, PyObject* args)
7070{
7171 // Gracious exit code is broken.
7272 SystemManager::instance ()->postExitRequest ();
73-
74- // Do it the control-C way (it always works)
75- DisplaySystem* ds = SystemManager::instance ()->getDisplaySystem ();
76- // Explicitly kill sound server
77- SoundEnvironment* se = Engine::instance ()->getSoundEnvironment ();
78- if (se != NULL )
73+ if (Engine::instance () != NULL )
7974 {
80- se->getSoundManager ()->stopAllSounds ();
81- se->getSoundManager ()->cleanupAllSounds ();
75+ // Do it the control-C way (it always works)
76+ DisplaySystem* ds = SystemManager::instance ()->getDisplaySystem ();
77+ // Explicitly kill sound server
78+ SoundEnvironment* se = Engine::instance ()->getSoundEnvironment ();
79+ if (se != NULL )
80+ {
81+ se->getSoundManager ()->stopAllSounds ();
82+ se->getSoundManager ()->cleanupAllSounds ();
83+ }
8284 }
8385 Py_INCREF (Py_None);
8486 return Py_None;
@@ -1386,6 +1388,7 @@ BOOST_PYTHON_MODULE(omega)
13861388 .def_readwrite (" panopticStereoEnabled" , &DisplayConfig::panopticStereoEnabled)
13871389 .def_readwrite (" canvasChangedCommand" , &DisplayConfig::canvasChangedCommand)
13881390 PYAPI_METHOD (DisplayConfig, setCanvasRect)
1391+ PYAPI_METHOD (DisplayConfig, bringToFront)
13891392 PYAPI_GETTER (DisplayConfig, getCanvasRect)
13901393 // .add_property("canvasPixelRect",
13911394 // make_getter(&DisplayConfig::canvasPixelRect, PYAPI_RETURN_VALUE),
0 commit comments