Fix Segmentation Fault & Formatting

This commit is contained in:
Anthony Calosa
2015-11-10 11:58:36 +08:00
parent 406f68ac5b
commit cd1b629191
71 changed files with 769 additions and 769 deletions

View File

@@ -37,18 +37,18 @@ WResourceManager* WResourceManager::sInstance = NULL;
WResourceManager* WResourceManager::Instance()
{
if (sInstance == NULL)
{
sInstance = NEW ResourceManagerImpl;
}
if (sInstance == NULL)
{
sInstance = NEW ResourceManagerImpl;
}
return sInstance;
return sInstance;
}
void WResourceManager::Terminate()
{
if (sInstance)
SAFE_DELETE(sInstance);
if (sInstance)
SAFE_DELETE(sInstance);
}
@@ -1040,12 +1040,12 @@ cacheItem* WCache<cacheItem, cacheActual>::AttemptNew(const string& filename, in
SAFE_DELETE(item);
return NULL;
}
else
else
{
DebugTrace("AttemptNew failed to load (not a 404 error). Deleting cache item " << ToHex(item));
SAFE_DELETE(item);
mError = CACHE_ERROR_BAD;
return NULL;
return NULL;
}
}