diff --git a/components/resource/bulletshape.cpp b/components/resource/bulletshape.cpp index d8315d08b6..1d4be1d14d 100644 --- a/components/resource/bulletshape.cpp +++ b/components/resource/bulletshape.cpp @@ -95,12 +95,12 @@ osg::ref_ptr makeInstance(osg::ref_ptr s } BulletShapeInstance::BulletShapeInstance(osg::ref_ptr source) - : mSource(source) + : mSource(std::move(source)) { - mCollisionBox = source->mCollisionBox; - mAnimatedShapes = source->mAnimatedShapes; - mCollisionShape = duplicateCollisionShape(source->mCollisionShape.get()); - mAvoidCollisionShape = duplicateCollisionShape(source->mAvoidCollisionShape.get()); + mCollisionBox = mSource->mCollisionBox; + mAnimatedShapes = mSource->mAnimatedShapes; + mCollisionShape = duplicateCollisionShape(mSource->mCollisionShape.get()); + mAvoidCollisionShape = duplicateCollisionShape(mSource->mAvoidCollisionShape.get()); } }