Przeglądaj źródła

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 12 lat temu
rodzic
commit
1fca335a2c
1 zmienionych plików z 1 dodań i 2 usunięć
  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);