From af337b9f2e55055f0faf318fcb76d0fd5adc1282 Mon Sep 17 00:00:00 2001 From: hiikariri Date: Fri, 29 Dec 2023 12:31:09 +0700 Subject: [PATCH] fix: handle missing joint splines --- src/akushon/action/model/action.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/akushon/action/model/action.cpp b/src/akushon/action/model/action.cpp index bf4ecc6..ea23afd 100644 --- a/src/akushon/action/model/action.cpp +++ b/src/akushon/action/model/action.cpp @@ -125,9 +125,9 @@ void Action::generate_splines() joint_splines.clear(); for (auto pose : poses) { for (auto & joint : pose.get_joints()) { - const auto it = joint_splines.find(joint.get_id()); + auto it = joint_splines.find(joint.get_id()); if (it == joint_splines.end()) { - joint_splines.emplace(joint.get_id(), std::make_shared()); + it = joint_splines.emplace(joint.get_id(), std::make_shared()).first; } it->second->add_point(joint.get_position(), pose.get_time()); }