diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 9fb233140..be873d09b 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -235,8 +235,11 @@ OMW::Engine::~Engine() mViewer = NULL; - SDL_DestroyWindow(mWindow); - mWindow = NULL; + if (mWindow) + { + SDL_DestroyWindow(mWindow); + mWindow = NULL; + } SDL_Quit(); }