Ensure no crash happens when skeleton is removed, closes #20677

This commit is contained in:
Juan Linietsky 2018-11-23 09:35:43 -03:00
parent a397d3a46a
commit c48027af92
1 changed files with 1 additions and 1 deletions

View File

@ -194,7 +194,7 @@ void Polygon2D::_notification(int p_what) {
}
}
if (!invert && bone_weights.size()) {
if (skeleton_node && !invert && bone_weights.size()) {
//a skeleton is set! fill indices and weights
int vc = points.size();
bones.resize(vc * 4);