Skip to content
Snippets Groups Projects
Commit 364f3f25 authored by Firat Yusuf Duran's avatar Firat Yusuf Duran :moyai:
Browse files

fix segfault

parent 886a0f21
No related branches found
No related tags found
2 merge requests!458Fluxio/dev get types,!449Fluxio preliminary release
Pipeline #20187 passed
......@@ -979,6 +979,14 @@ namespace armarx::plugins
s.parameters[failed.id] = failed;
s.parameters[aborted.id] = aborted;
const auto& parameters = std::make_shared<aron::type::Object>();
typesLock.lock();
if (fluxioDC.types.find(s.id) == fluxioDC.types.end())
{
fluxioDC.types[s.id] = parameters;
}
typesLock.unlock();
if (skillDescription.parametersType != nullptr)
{
// input parameters
......@@ -1572,8 +1580,13 @@ namespace armarx::plugins
std::shared_lock l(fluxioDC.typesMutex);
for (const auto& [skillId, skillTypes] : fluxioDC.types)
{
if (skillTypes == nullptr) {
ARMARX_WARNING << "SkillTypes with id '" << skillId << "' not found.";
continue;
}
ret->addMemberType(skillId, skillTypes);
}
l.unlock();
ret->setObjectName("SkillTypes");
return ret;
}
......
......@@ -181,7 +181,7 @@ namespace armarx
aron::type::dto::AronObjectPtr
SkillManagerComponentPluginUser::getTypes(const Ice::Current& current)
{
const auto res = this->plugin->getTypes();
const auto& res = this->plugin->getTypes();
return res->toAronObjectDTO();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment