Explorar o código

Be careful with global var initialization order. All mutexes should be initialized before all CLoggers. Caused a crash on OS X when compiling with clang

stopiccot %!s(int64=12) %!d(string=hai) anos
pai
achega
1fca335a2c
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      lib/logging/CLogger.cpp

+ 1 - 2
lib/logging/CLogger.cpp

@@ -49,6 +49,7 @@ CLoggerStream::~CLoggerStream()
 }
 
 boost::recursive_mutex CLogger::smx;
+boost::recursive_mutex CLogManager::smx;
 
 DLL_LINKAGE CLogger * logGlobal = CLogger::getGlobalLogger();
 
@@ -230,8 +231,6 @@ CTraceLogger::~CTraceLogger()
 	logger->traceStream() << endMessage;
 }
 
-boost::recursive_mutex CLogManager::smx;
-
 CLogManager & CLogManager::get()
 {
 	TLockGuardRec _(smx);