X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=kernel%2Fsrc%2FbbtkConnection.cxx;fp=kernel%2Fsrc%2FbbtkConnection.cxx;h=2c99b6e2518a8a274b59357c1bfa45eadc2f6c54;hb=6c5d7746e8e4cb0b5d6e164b917008a7137910fb;hp=8d60b38699afa0f73b65fa34d6243c95155a5d09;hpb=124be3ddcc78e6e714fe7f09ba1fb71e4d1fd66a;p=bbtk.git diff --git a/kernel/src/bbtkConnection.cxx b/kernel/src/bbtkConnection.cxx index 8d60b38..2c99b6e 100644 --- a/kernel/src/bbtkConnection.cxx +++ b/kernel/src/bbtkConnection.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkConnection.cxx,v $ Language: C++ - Date: $Date: 2008/03/18 12:51:26 $ - Version: $Revision: 1.4 $ + Date: $Date: 2008/04/08 06:59:30 $ + Version: $Revision: 1.5 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See doc/license.txt or @@ -122,7 +122,13 @@ namespace bbtk //================================================================== - + void Connection::Clear() + { + mFrom = 0; + mTo = 0; + mAdaptor = 0; + } + //================================================================== /// Dtor Connection::~Connection() @@ -131,8 +137,8 @@ namespace bbtk "Connection::~Connection() [" <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);