diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-11-23 09:35:43 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-11-23 09:35:43 -0300 |
commit | c48027af922a7203dc53bc41435a9d9021ba3291 (patch) | |
tree | 41a669e70e12fd1c4b760063d0b72f439fd5f40c /scene/2d | |
parent | a397d3a46ae12a997ffd52dade774d1063cca13f (diff) |
Ensure no crash happens when skeleton is removed, closes #20677
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/polygon_2d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index fc0741cc5c..aa6d57a67d 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -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); |