diff --git a/src/osgDB/ObjectCache.cpp b/src/osgDB/ObjectCache.cpp index 118942dc8..6f491890c 100644 --- a/src/osgDB/ObjectCache.cpp +++ b/src/osgDB/ObjectCache.cpp @@ -69,7 +69,7 @@ void ObjectCache::addObjectCache(ObjectCache* objectCache) void ObjectCache::addEntryToObjectCache(const std::string& filename, osg::Object* object, double timestamp, const Options *options) { OpenThreads::ScopedLock lock(_objectCacheMutex); - _objectCache[FileNameOptionsPair(filename, osg::clone(options))] = ObjectTimeStampPair(object,timestamp); + _objectCache[FileNameOptionsPair(filename, options ? osg::clone(options) : 0)] = ObjectTimeStampPair(object,timestamp); OSG_DEBUG<<"Adding "<getOptionString() : "")<<"' to ObjectCache "<