Fix for a crash (I think the same one Zeth reported) where the game dies somewhere in file reading source - I wasn't paying close enough attention to the fact that there are in fact 3 separate caches, so each had their own mutex, so JFileSystem wasn't actually being protected from reentrancy. So, if the app tried to load an audio sample at the same time as an image, boom...
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
#include "MTGDeck.h"
|
||||
#include "MTGCard.h"
|
||||
#include "utils.h"
|
||||
#include "Threading.h"
|
||||
#include "WResourceManager.h"
|
||||
#include "WCachedResource.h"
|
||||
#include "WFont.h"
|
||||
@@ -120,11 +119,6 @@ protected:
|
||||
|
||||
unsigned int cacheItems;
|
||||
int mError;
|
||||
|
||||
// mutex meant for the cache map
|
||||
boost::mutex mCacheMutex;
|
||||
// mutex meant to protect against unthread-safe calls into JFileSystem, etc.
|
||||
boost::mutex mLoadFunctionMutex;
|
||||
};
|
||||
|
||||
struct WManagedQuad
|
||||
|
||||
Reference in New Issue
Block a user