Fixed handling of when dynamic_cast<> returns NULL

This commit is contained in:
Robert Osfield
2016-06-24 10:13:26 +01:00
parent 9cdb65d5c7
commit 6e7e286fa0

View File

@@ -172,7 +172,7 @@ void LineEdit::createGraphicsImplementation()
osg::ref_ptr<Node> node = style->createText(extents, getAlignmentSettings(), getTextSettings(), _text);
_textDrawable = dynamic_cast<osgText::Text*>(node.get());
_textDrawable->setDataVariance(osg::Object::DYNAMIC);
node->setDataVariance(osg::Object::DYNAMIC);
group->addChild(node.get());
style->setupClipStateSet(_extents, getOrCreateWidgetStateSet());