Skip to content

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

C

Fix crash moving cell with shaderfx (#504)

manongjohn2dc92fcc7ec9
diff --git a/toonz/sources/toonzqt/stageobjectsdata.cpp b/toonz/sources/toonzqt/stageobjectsdata.cpp
index 4844a3a9d..5b83a5f95 100644
--- a/toonz/sources/toonzqt/stageobjectsdata.cpp
+++ b/toonz/sources/toonzqt/stageobjectsdata.cpp
@@ -75,7 +75,8 @@ FxCanGenerateState canGenerate(const std::set<TFx *> &fxsSet, TFx *fx) {
//! Returns whether the specified fx is a downstream node of the xsheet node.
bool hasTerminalUpstream(TFx *fx, TFxSet *terminalFxs) {
- if (TZeraryFx *zfx = dynamic_cast<TZeraryFx *>(fx))
+ TZeraryFx *zfx = dynamic_cast<TZeraryFx *>(fx);
+ if (zfx && zfx->getColumnFx())
return hasTerminalUpstream(zfx->getColumnFx(), terminalFxs);
if (terminalFxs->containsFx(fx)) return true;