Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

fix plastic bone crash (#2041)

shun-iwasawa5e26e06b9124
diff --git a/toonz/sources/tnztools/plastictool_build.cpp b/toonz/sources/tnztools/plastictool_build.cpp
index c79751984..23cb72aac 100644
--- a/toonz/sources/tnztools/plastictool_build.cpp
+++ b/toonz/sources/tnztools/plastictool_build.cpp
@@ -805,6 +805,9 @@ void PlasticTool::removeSkeleton(int skelId) {
clearSkeletonSelections();
if (m_sd) {
+ // in order to solve the crash issue #1967, try releasing deformer data here
+ PlasticDeformerStorage::instance()->releaseSkeletonData(
+ stageObject()->getPlasticSkeletonDeformation().getPointer(), skelId);
m_sd->detach(skelId);
if (m_sd->empty())
stageObject()->setPlasticSkeletonDeformation(