Fixed crash during compile traversal

This commit is contained in:
Robert Osfield 2020-04-29 09:14:01 +01:00
parent 864b087b1f
commit e4373b0143

View File

@ -349,7 +349,6 @@ void FadeText::init()
void FadeText::drawImplementation(osg::RenderInfo& renderInfo) const void FadeText::drawImplementation(osg::RenderInfo& renderInfo) const
{ {
osg::State& state = *renderInfo.getState(); osg::State& state = *renderInfo.getState();
ViewBlendColourMap::iterator itr = _viewBlendColourMap.find(renderInfo.getView()); ViewBlendColourMap::iterator itr = _viewBlendColourMap.find(renderInfo.getView());
@ -385,7 +384,7 @@ void FadeText::drawImplementation(osg::RenderInfo& renderInfo) const
renderInfo.setUserData(userData); 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) if (frameNumber != userData->_frameNumber)
{ {
// new frame so must reset UserData structure. // new frame so must reset UserData structure.