Fix crash in skeletonization

This commit is contained in:
Maxime Gimeno 2020-06-03 15:02:58 +02:00
parent ee4f996043
commit 9551708e88
1 changed files with 5 additions and 1 deletions

View File

@ -245,8 +245,12 @@ public Q_SLOTS:
{ {
for(int i = 0; i < children.size(); ++i) for(int i = 0; i < children.size(); ++i)
{ {
if(children[i] >= removed_id) if(children[i] > removed_id)
--children[i]; --children[i];
else if(children[i] == removed_id)//child has been removed from the scene, it doesn't exist anymore.
{
children.removeAll(removed_id);
}
} }
} }
private: private: