Skip to content

Commit

Permalink
Ensure no crash happens when skeleton is removed, closes #20677
Browse files Browse the repository at this point in the history
  • Loading branch information
reduz committed Nov 23, 2018
1 parent a397d3a commit c48027a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/2d/polygon_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c48027a

Please sign in to comment.