summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-11-23 09:35:43 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-11-23 09:35:43 -0300
commitc48027af922a7203dc53bc41435a9d9021ba3291 (patch)
tree41a669e70e12fd1c4b760063d0b72f439fd5f40c /scene/2d
parenta397d3a46ae12a997ffd52dade774d1063cca13f (diff)
Ensure no crash happens when skeleton is removed, closes #20677
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/polygon_2d.cpp2
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);