Skip to content
Browse files

[fix] a couple crashes on exit on windows.

  • Loading branch information...
1 parent 31843b4 commit 47c320bcc33c326c5bb594628dcaa924a1228885 Jim Carroll committed
Showing with 6 additions and 3 deletions.
  1. +3 −1 xbmc/Application.cpp
  2. +0 −1 xbmc/SystemGlobals.cpp
  3. +3 −1 xbmc/settings/GUISettings.h
View
4 xbmc/Application.cpp
@@ -2076,7 +2076,9 @@ void CApplication::UnloadSkin(bool forReload /* = false */)
g_infoManager.Clear();
- g_SkinInfo.reset();
+// The g_SkinInfo boost shared_ptr ought to be reset here
+// but there are too many places it's used without checking for NULL
+// and as a result a race condition on exit can cause a crash.
}
bool CApplication::LoadUserWindows()
View
1 xbmc/SystemGlobals.cpp
@@ -55,7 +55,6 @@
#include "linux/RBP.h"
#endif
- CGUISettings g_guiSettings;
CSettings g_settings;
CXBMCRenderManager g_renderManager;
View
4 xbmc/settings/GUISettings.h
@@ -25,6 +25,7 @@
#include "guilib/Resolution.h"
#include "addons/IAddon.h"
#include "utils/Observer.h"
+#include "utils/GlobalsHandling.h"
class TiXmlNode;
class TiXmlElement;
@@ -526,4 +527,5 @@ class CGUISettings : public Observable
void LoadFromXML(TiXmlElement *pRootElement, mapIter &it, bool advanced = false);
};
-extern CGUISettings g_guiSettings;
+XBMC_GLOBAL_REF(CGUISettings, g_guiSettings);
+#define g_guiSettings XBMC_GLOBAL_USE(CGUISettings)

0 comments on commit 47c320b

Please sign in to comment.
Something went wrong with that request. Please try again.