Fixed crash the occurred when passing in a osgDB::Options to the ObjectCache that doesn't have any references to it.
This commit is contained in:
@@ -70,14 +70,17 @@ class OSGDB_EXPORT ObjectCache : public osg::Referenced
|
||||
|
||||
typedef std::pair<std::string, osg::ref_ptr<const osgDB::Options> > FileNameOptionsPair;
|
||||
|
||||
class ClassComp {
|
||||
public:
|
||||
struct ClassComp
|
||||
{
|
||||
bool operator() (const ObjectCache::FileNameOptionsPair& lhs, const ObjectCache::FileNameOptionsPair& rhs) const;
|
||||
};
|
||||
|
||||
|
||||
typedef std::pair<osg::ref_ptr<osg::Object>, double > ObjectTimeStampPair;
|
||||
typedef std::map<FileNameOptionsPair, ObjectTimeStampPair, ClassComp> ObjectCacheMap;
|
||||
|
||||
ObjectCacheMap::iterator find(const std::string& fileName, const osgDB::Options* options);
|
||||
|
||||
ObjectCacheMap _objectCache;
|
||||
OpenThreads::Mutex _objectCacheMutex;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user