From c48027af922a7203dc53bc41435a9d9021ba3291 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 23 Nov 2018 09:35:43 -0300 Subject: [PATCH] Ensure no crash happens when skeleton is removed, closes #20677 --- scene/2d/polygon_2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index fc0741cc5c0..aa6d57a67d4 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);