Skip to content
This repository
Browse code

[fix] a couple crashes on exit on windows.

  • Loading branch information...
commit 47c320bcc33c326c5bb594628dcaa924a1228885 1 parent 31843b4
authored December 22, 2012
4  xbmc/Application.cpp
@@ -2076,7 +2076,9 @@ void CApplication::UnloadSkin(bool forReload /* = false */)
2076 2076
 
2077 2077
   g_infoManager.Clear();
2078 2078
 
2079  
-  g_SkinInfo.reset();
  2079
+//  The g_SkinInfo boost shared_ptr ought to be reset here
  2080
+// but there are too many places it's used without checking for NULL
  2081
+// and as a result a race condition on exit can cause a crash.
2080 2082
 }
2081 2083
 
2082 2084
 bool CApplication::LoadUserWindows()
1  xbmc/SystemGlobals.cpp
@@ -55,7 +55,6 @@
55 55
 #include "linux/RBP.h"
56 56
 #endif
57 57
 
58  
-  CGUISettings       g_guiSettings;
59 58
   CSettings          g_settings;
60 59
 
61 60
   CXBMCRenderManager g_renderManager;
4  xbmc/settings/GUISettings.h
@@ -25,6 +25,7 @@
25 25
 #include "guilib/Resolution.h"
26 26
 #include "addons/IAddon.h"
27 27
 #include "utils/Observer.h"
  28
+#include "utils/GlobalsHandling.h"
28 29
 
29 30
 class TiXmlNode;
30 31
 class TiXmlElement;
@@ -526,4 +527,5 @@ class CGUISettings : public Observable
526 527
   void LoadFromXML(TiXmlElement *pRootElement, mapIter &it, bool advanced = false);
527 528
 };
528 529
 
529  
-extern CGUISettings g_guiSettings;
  530
+XBMC_GLOBAL_REF(CGUISettings, g_guiSettings);
  531
+#define g_guiSettings XBMC_GLOBAL_USE(CGUISettings)

0 notes on commit 47c320b

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