diff --git a/src/vsg/animation/CameraAnimation.cpp b/src/vsg/animation/CameraAnimation.cpp index 3f7443725..cab01b975 100644 --- a/src/vsg/animation/CameraAnimation.cpp +++ b/src/vsg/animation/CameraAnimation.cpp @@ -55,7 +55,7 @@ CameraAnimation::CameraAnimation(ref_ptr in_object, const Path& in_filen // convert TransformSampler to CameraSampler cameraSampler = CameraSampler::create(); cameraSampler->name = ts->name; - auto& ckf = cameraSampler->keyframes = CameraKeyframes::create(); + const auto& ckf = cameraSampler->keyframes = CameraKeyframes::create(); ckf->positions = tkf->positions; ckf->rotations = tkf->rotations; @@ -66,7 +66,7 @@ CameraAnimation::CameraAnimation(ref_ptr in_object, const Path& in_filen else if (auto keyframes = read_object.cast()) { cameraSampler = CameraSampler::create(); - auto& ckf = cameraSampler->keyframes = CameraKeyframes::create(); + const auto& ckf = cameraSampler->keyframes = CameraKeyframes::create(); ckf->positions = keyframes->positions; ckf->rotations = keyframes->rotations;