From c279aa26fb713509d99cbf58453da6ccc71983ff Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 4 May 2018 09:22:54 +0100 Subject: [PATCH] Fixed null pointer warning --- src/osgDB/ObjectCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 "<