From ee3bfe94a32096237f26d00348416d4a2cca674c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 5 May 2009 11:03:57 +0000 Subject: [PATCH] Added checks to prevent crashes when no imagery is assigend to volume --- src/osgVolume/RayTracedTechnique.cpp | 31 +++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/src/osgVolume/RayTracedTechnique.cpp b/src/osgVolume/RayTracedTechnique.cpp index 84a5b3dac..8c3888d38 100644 --- a/src/osgVolume/RayTracedTechnique.cpp +++ b/src/osgVolume/RayTracedTechnique.cpp @@ -51,21 +51,38 @@ enum ShadingModel void RayTracedTechnique::init() { - osg::notify(osg::NOTICE)<<"RayTracedTechnique::init()"<getLayer()==0) + { + osg::notify(osg::NOTICE)<<"RayTracedTechnique::init(), error no layer assigend to volume tile."<getLayer()->getImage()==0) + { + osg::notify(osg::NOTICE)<<"RayTracedTechnique::init(), error no image assigned to layer."<getLocator(); image_3d = _volumeTile->getLayer()->getImage(); - + + CollectPropertiesVisitor cpv; if (_volumeTile->getLayer()->getProperty()) {