From 4a9b37aa53a896726618f689edca8055ac5c208a Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 4 Dec 2015 18:08:14 +0100 Subject: [PATCH] Fix copy constructor issue --- components/sceneutil/lightmanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/sceneutil/lightmanager.cpp b/components/sceneutil/lightmanager.cpp index 6a992c503..1706bb2b1 100644 --- a/components/sceneutil/lightmanager.cpp +++ b/components/sceneutil/lightmanager.cpp @@ -260,10 +260,12 @@ namespace SceneUtil LightSource::LightSource(const LightSource ©, const osg::CopyOp ©op) : osg::Node(copy, copyop) - , mLight(copy.mLight) , mRadius(copy.mRadius) { mId = sLightId++; + + for (int i=0; i<2; ++i) + mLight[i] = osg::clone(copy.mLight[i].get(), copyop); }