From 281800539e7b6eb9078b85689c357ff3c953e5c9 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 31 Jan 2009 21:45:47 +0000 Subject: [PATCH] Fixed handling of TransferFunctionProperty. --- examples/osgvolume/osgvolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/osgvolume/osgvolume.cpp b/examples/osgvolume/osgvolume.cpp index 85f3554ba..478513a02 100644 --- a/examples/osgvolume/osgvolume.cpp +++ b/examples/osgvolume/osgvolume.cpp @@ -1269,7 +1269,7 @@ int main( int argc, char **argv ) osgVolume::AlphaFuncProperty* ap = new osgVolume::AlphaFuncProperty(alphaFunc); osgVolume::SampleDensityProperty* sd = new osgVolume::SampleDensityProperty(0.005); osgVolume::TransparencyProperty* tp = new osgVolume::TransparencyProperty(1.0); - osgVolume::TransferFunctionProperty* tfp = new osgVolume::TransferFunctionProperty(transferFunction.get()); + osgVolume::TransferFunctionProperty* tfp = transferFunction.valid() ? new osgVolume::TransferFunctionProperty(transferFunction.get()) : 0; { // Standard