Skip to content

Commit

Permalink
[fix] a couple crashes on exit on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Carroll committed Dec 22, 2012
1 parent 31843b4 commit 47c320b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion xbmc/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion xbmc/SystemGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
#include "linux/RBP.h"
#endif

CGUISettings g_guiSettings;
CSettings g_settings;

CXBMCRenderManager g_renderManager;
Expand Down
4 changes: 3 additions & 1 deletion xbmc/settings/GUISettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "guilib/Resolution.h"
#include "addons/IAddon.h"
#include "utils/Observer.h"
#include "utils/GlobalsHandling.h"

class TiXmlNode;
class TiXmlElement;
Expand Down Expand Up @@ -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.