Added extra check to make sure that _userDataContainer was available before copying it

This commit is contained in:
Robert Osfield 2011-06-02 22:49:29 +00:00
parent 52e3f300e8
commit deed0a89fe

View File

@ -23,6 +23,8 @@ Object::Object(const Object& obj,const CopyOp& copyop):
Referenced(),
_name(obj._name),
_dataVariance(obj._dataVariance)
{
if (obj._userDataContainer.valid())
{
if (copyop.getCopyFlags()&osg::CopyOp::DEEP_COPY_USERDATA)
{
@ -33,6 +35,7 @@ Object::Object(const Object& obj,const CopyOp& copyop):
_userDataContainer = obj._userDataContainer;
}
}
}
void Object::setThreadSafeRefUnref(bool threadSafe)
{