diff --git a/toonz/sources/toonzqt/fxselection.cpp b/toonz/sources/toonzqt/fxselection.cpp index b93da1e..20e03ef 100644 --- a/toonz/sources/toonzqt/fxselection.cpp +++ b/toonz/sources/toonzqt/fxselection.cpp @@ -417,6 +417,7 @@ Link FxSelection::getBoundingFxs(SchematicLink *link) { Link FxSelection::getBoundingFxs(SchematicPort *inputPort, SchematicPort *outputPort) { Link boundingFxs; + if (!inputPort || !outputPort) return boundingFxs; FxSchematicNode *inputNode = dynamic_cast(outputPort->getNode()); FxSchematicNode *outputNode = diff --git a/toonz/sources/toonzqt/schematicnode.cpp b/toonz/sources/toonzqt/schematicnode.cpp index b53c62f..16cd342 100644 --- a/toonz/sources/toonzqt/schematicnode.cpp +++ b/toonz/sources/toonzqt/schematicnode.cpp @@ -564,6 +564,12 @@ void SchematicLink::mousePressEvent(QGraphicsSceneMouseEvent *me) { QPointF pos = me->scenePos(); SchematicPort *startPort = getStartPort(); SchematicPort *endPort = getEndPort(); + + if (!startPort || !endPort) { + me->ignore(); + return; + } + if (startPort && endPort) { QRectF startRect = startPort->boundingRect(); startRect.moveTopLeft(startPort->scenePos());