From 57b999b310be993ab0c032a1d05ad3ee4f5cac23 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 23 Jun 2016 10:05:50 +0100 Subject: [PATCH] Fixed check against null --- applications/present3D/ReadShowFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/present3D/ReadShowFile.cpp b/applications/present3D/ReadShowFile.cpp index 4e00bc756..147a54bda 100644 --- a/applications/present3D/ReadShowFile.cpp +++ b/applications/present3D/ReadShowFile.cpp @@ -222,8 +222,8 @@ osg::ref_ptr p3d::readShowFiles(osg::ArgumentParser& arguments,const while (arguments.read("--movie",filename)) { osg::ref_ptr image = readRefImageFile(filename.c_str(), local_options.get()); - osg::ref_ptr imageStream = dynamic_cast(image.get()); - if (image.valid()) + osg::ImageStream* imageStream = dynamic_cast(image.get()); + if (imageStream) { imageStream->play(); nodeList.push_back(osg::createGeodeForImage(imageStream));