mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
return if source is null in mergeUserData
This commit is contained in:
parent
1edeffbafc
commit
01a8998e3b
@ -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 New Issue
Block a user