File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -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;
You can’t perform that action at this time.
0 commit comments