From b26e7f01ba44d9edc583557ceb8cc06f1b98de34 Mon Sep 17 00:00:00 2001 From: Rodney Date: Oct 08 2021 10:07:02 +0000 Subject: Merge pull request #4094 from shun-iwasawa/g/fix_crush_on_inserting_fx Fix Crush On Inserting Fx --- diff --git a/toonz/sources/toonzqt/fxschematicscene.cpp b/toonz/sources/toonzqt/fxschematicscene.cpp index 1e5d653..8f820b1 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