diff --git a/src/osgText/FadeText.cpp b/src/osgText/FadeText.cpp index 56d15998c..b1756ed34 100644 --- a/src/osgText/FadeText.cpp +++ b/src/osgText/FadeText.cpp @@ -349,7 +349,6 @@ void FadeText::init() void FadeText::drawImplementation(osg::RenderInfo& renderInfo) const { - osg::State& state = *renderInfo.getState(); ViewBlendColourMap::iterator itr = _viewBlendColourMap.find(renderInfo.getView()); @@ -385,7 +384,7 @@ void FadeText::drawImplementation(osg::RenderInfo& renderInfo) const renderInfo.setUserData(userData); } - unsigned int frameNumber = renderInfo.getState()->getFrameStamp()->getFrameNumber(); + unsigned int frameNumber = renderInfo.getState()->getFrameStamp() ? renderInfo.getState()->getFrameStamp()->getFrameNumber() : 0; if (frameNumber != userData->_frameNumber) { // new frame so must reset UserData structure.