mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 02:41:35 +00:00
return if source is null in mergeUserData
This commit is contained in:
parent
1edeffbafc
commit
01a8998e3b
1 changed files with 3 additions and 0 deletions
|
@ -88,6 +88,9 @@ namespace SceneUtil
|
||||||
|
|
||||||
void mergeUserData(const osg::UserDataContainer* source, osg::Object* target)
|
void mergeUserData(const osg::UserDataContainer* source, osg::Object* target)
|
||||||
{
|
{
|
||||||
|
if (!source)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!target->getUserDataContainer())
|
if (!target->getUserDataContainer())
|
||||||
target->setUserDataContainer(osg::clone(source, osg::CopyOp::SHALLOW_COPY));
|
target->setUserDataContainer(osg::clone(source, osg::CopyOp::SHALLOW_COPY));
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue