From daf423723270a9af21fa553d9c0e2a4cd20f4aca Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 29 Apr 2020 09:14:01 +0100 Subject: [PATCH] Fixed crash during compile traversal --- src/osgText/FadeText.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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.