1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

return if source is null in mergeUserData

This commit is contained in:
psi29a 2021-09-10 14:04:11 +00:00
parent 1edeffbafc
commit 01a8998e3b

View File

@ -88,6 +88,9 @@ namespace SceneUtil
void mergeUserData(const osg::UserDataContainer* source, osg::Object* target)
{
if (!source)
return;
if (!target->getUserDataContainer())
target->setUserDataContainer(osg::clone(source, osg::CopyOp::SHALLOW_COPY));
else