From c49b8eaf546069c0660f2155beb450840b0b5c8d Mon Sep 17 00:00:00 2001 From: Jim Carroll Date: Mon, 31 Dec 2012 09:50:30 -0500 Subject: [PATCH] [fix] It appears that we were running out of Tls on windows. This changes the addon system so that a single one is created for the Interceptor functionality rather than one per window. --- xbmc/interfaces/legacy/Window.cpp | 2 ++ xbmc/interfaces/legacy/WindowInterceptor.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/xbmc/interfaces/legacy/Window.cpp b/xbmc/interfaces/legacy/Window.cpp index aae36312432b5..9367782ce0384 100644 --- a/xbmc/interfaces/legacy/Window.cpp +++ b/xbmc/interfaces/legacy/Window.cpp @@ -37,6 +37,8 @@ namespace XBMCAddon { namespace xbmcgui { + XbmcThreads::ThreadLocal InterceptorBase::upcallTls; + /** * Used in add/remove control. It only locks if it's given a * non-NULL CCriticalSection. It's given a NULL CCriticalSection diff --git a/xbmc/interfaces/legacy/WindowInterceptor.h b/xbmc/interfaces/legacy/WindowInterceptor.h index 636136ae1d637..263de363aa9bd 100644 --- a/xbmc/interfaces/legacy/WindowInterceptor.h +++ b/xbmc/interfaces/legacy/WindowInterceptor.h @@ -43,7 +43,8 @@ namespace XBMCAddon { protected: AddonClass::Ref window; - XbmcThreads::ThreadLocal upcallTls; + // This instance is in Window.cpp + static XbmcThreads::ThreadLocal upcallTls; InterceptorBase() : window(NULL) { upcallTls.set(NULL); }