浏览代码

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

Juan Linietsky 6 年之前
父节点
当前提交
c48027af92
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/2d/polygon_2d.cpp

+ 1 - 1
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);