From cee608e31bec969272b5e7aa0049280e2f12b0db Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 21 Feb 2016 01:41:50 +0100 Subject: [PATCH] Make it work with appveyor's outdated OSG build --- components/resource/objectcache.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/resource/objectcache.cpp b/components/resource/objectcache.cpp index 5fec6730d..7caf5366c 100644 --- a/components/resource/objectcache.cpp +++ b/components/resource/objectcache.cpp @@ -129,9 +129,12 @@ void ObjectCache::accept(osg::NodeVisitor &nv) ++itr) { osg::Object* object = itr->second.first.get(); - osg::Node* node = object->asNode(); - if (node) - node->accept(nv); + if (object) + { + osg::Node* node = dynamic_cast(object); + if (node) + node->accept(nv); + } } }