Skip to content
Snippets Groups Projects
Commit 22f2435c authored by Peter Albrecht's avatar Peter Albrecht
Browse files

Fix for segfault on provider click

parent 4905bbc0
No related branches found
No related tags found
No related merge requests found
...@@ -571,6 +571,7 @@ namespace armarx ...@@ -571,6 +571,7 @@ namespace armarx
SkillManagerMonitorWidgetController::stopAllExecutions() SkillManagerMonitorWidgetController::stopAllExecutions()
{ {
auto tree = widget.treeWidgetSkillExecutions; auto tree = widget.treeWidgetSkillExecutions;
ARMARX_INFO << "The user requested to stop all skill executions from GUI.";
for (ssize_t i = 0; i < tree->topLevelItemCount(); ++i) for (ssize_t i = 0; i < tree->topLevelItemCount(); ++i)
{ {
auto item = static_cast<SkillExecutionInfoTreeWidgetItem*>( auto item = static_cast<SkillExecutionInfoTreeWidgetItem*>(
...@@ -585,8 +586,6 @@ namespace armarx ...@@ -585,8 +586,6 @@ namespace armarx
std::scoped_lock l(updateMutex); std::scoped_lock l(updateMutex);
/* /*
* Example skills are not fully specified; disabled check
*
if (selectedSkill.skillExecutionId.skillId.fullySpecified()) if (selectedSkill.skillExecutionId.skillId.fullySpecified())
{ {
ARMARX_INFO << "The user requested to stop a skill, which was not fully specified!"; ARMARX_INFO << "The user requested to stop a skill, which was not fully specified!";
...@@ -598,7 +597,7 @@ namespace armarx ...@@ -598,7 +597,7 @@ namespace armarx
{ {
return; return;
} }
*/ */
ARMARX_INFO << "Stopping skill from GUI: " << selectedSkill.skillExecutionId.toString(); ARMARX_INFO << "Stopping skill from GUI: " << selectedSkill.skillExecutionId.toString();
...@@ -639,14 +638,14 @@ namespace armarx ...@@ -639,14 +638,14 @@ namespace armarx
if (!current->parent()) if (!current->parent())
{ {
// no parent available. Perhaps provider clicked? Reset selected skill. // no parent available. Perhaps provider clicked? Reset selected skill.
selectedSkill.skillId.providerId->providerName = ""; selectedSkill.skillId = SelectedSkill::UNK_SKILL_ID;
selectedSkill.skillId.skillName = "";
return; return;
} }
auto c = static_cast<SkillInfoTreeWidgetItem*>(current); auto c = static_cast<SkillInfoTreeWidgetItem*>(current);
auto skillDescription = c->skillDescription; auto skillDescription = c->skillDescription;
if (selectedSkill.skillId == skillDescription.skillId) if (selectedSkill.skillId == skillDescription.skillId)
{ {
// no change // no change
......
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