Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See doc/license.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See doc/license.txt or
/// Ctor with the black box from and to and their input and output.
/// Check the input and output compatibility
Connection::Connection(BlackBox* from, const std::string& output,
/// Ctor with the black box from and to and their input and output.
/// Check the input and output compatibility
Connection::Connection(BlackBox* from, const std::string& output,
- mFrom->bbDisconnectOutput(mOutput,this);
- mTo->bbDisconnectInput(mInput,this);
+ if (mFrom) mFrom->bbDisconnectOutput(mOutput,this);
+ if (mTo) mTo->bbDisconnectInput(mInput,this);
if (mAdaptor) mAdaptor->bbDelete();
bbtkDebugDecTab("Kernel",7);
if (mAdaptor) mAdaptor->bbDelete();
bbtkDebugDecTab("Kernel",7);