Skip to content

Instantly share code, notes, and snippets.

@asavah
Created May 29, 2017 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asavah/18ce20ce24dd3bad35a6c4fc0ec64d31 to your computer and use it in GitHub Desktop.
Save asavah/18ce20ce24dd3bad35a6c4fc0ec64d31 to your computer and use it in GitHub Desktop.
diff --git a/xbmc/guilib/GUIWindowManager.cpp b/xbmc/guilib/GUIWindowManager.cpp
index 2a3b7f1653..34b534dc65 100644
--- a/xbmc/guilib/GUIWindowManager.cpp
+++ b/xbmc/guilib/GUIWindowManager.cpp
@@ -1210,13 +1210,15 @@ void CGUIWindowManager::DeInitialize()
for (WindowMap::iterator it = m_mapWindows.begin(); it != m_mapWindows.end(); ++it)
{
CGUIWindow* pWindow = (*it).second;
- if (IsWindowActive(it->first, false))
- {
- pWindow->DisableAnimations();
- pWindow->Close(true);
+ if (pWindow) {
+ if (IsWindowActive(it->first, false))
+ {
+ pWindow->DisableAnimations();
+ pWindow->Close(true);
+ }
+ pWindow->ResetControlStates();
+ pWindow->FreeResources(true);
}
- pWindow->ResetControlStates();
- pWindow->FreeResources(true);
}
UnloadNotOnDemandWindows();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment