From 6e7e286fa0f6a648dd7dad936e9aa1ce09172ecc Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 24 Jun 2016 10:13:26 +0100 Subject: [PATCH] Fixed handling of when dynamic_cast<> returns NULL --- src/osgUI/LineEdit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgUI/LineEdit.cpp b/src/osgUI/LineEdit.cpp index 9587a148f..2caf70bff 100644 --- a/src/osgUI/LineEdit.cpp +++ b/src/osgUI/LineEdit.cpp @@ -172,7 +172,7 @@ void LineEdit::createGraphicsImplementation() osg::ref_ptr node = style->createText(extents, getAlignmentSettings(), getTextSettings(), _text); _textDrawable = dynamic_cast(node.get()); - _textDrawable->setDataVariance(osg::Object::DYNAMIC); + node->setDataVariance(osg::Object::DYNAMIC); group->addChild(node.get()); style->setupClipStateSet(_extents, getOrCreateWidgetStateSet());