FormatManager: actually return the singleton instance.

This should work better.
This commit is contained in:
Adrien Destugues 2014-04-04 12:36:44 +02:00
parent 6a2fd3a50e
commit 8bbdad1487

View File

@ -143,11 +143,10 @@ FormatManager::CreateInstance()
/* static */ FormatManager*
FormatManager::GetInstance()
{
static FormatManager* sFormatManager = NULL;
if (sFormatManager == NULL)
if (sInstance == NULL)
pthread_once(&sInitOnce, &CreateInstance);
return sFormatManager;
return sInstance;
}