From 63d31c2d600ca2b0bf83355f3f4c227782962efd Mon Sep 17 00:00:00 2001 From: shun-iwasawa Date: Fri, 8 Oct 2021 15:56:15 +0900 Subject: [PATCH] fix crush on inserting fx --- toonz/sources/toonzqt/fxschematicscene.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/toonz/sources/toonzqt/fxschematicscene.cpp b/toonz/sources/toonzqt/fxschematicscene.cpp index 1e5d6536..8f820b18 100644 --- a/toonz/sources/toonzqt/fxschematicscene.cpp +++ b/toonz/sources/toonzqt/fxschematicscene.cpp @@ -2194,8 +2194,12 @@ bool FxSchematicScene::isAnEmptyZone_withParentFx(const QRectF &rect, if (fxNode && fxNode->isA(eXSheetFx)) continue; // check only the fxs sharing the same parent if (!fxNode) continue; - for (int p = 0; p < fxNode->getInputPortCount(); p++) { - if (parent == fxNode->getFx()->getInputPort(p)->getFx()) { + TFx *fx = fxNode->getFx(); + if (TZeraryColumnFx *zfx = dynamic_cast(fx)) + fx = zfx->getZeraryFx(); + if (!fx || fx == parent) continue; + for (int p = 0; p < fx->getInputPortCount(); p++) { + if (parent == fx->getInputPort(p)->getFx()) { if (node->boundingRect().translated(node->scenePos()).intersects(rect)) return false; else