]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Fix crash described in bug PAL12575 : Superv: GNode - unexpected abort.
authormkr <mkr@opencascade.com>
Wed, 10 Jan 2007 11:58:43 +0000 (11:58 +0000)
committermkr <mkr@opencascade.com>
Wed, 10 Jan 2007 11:58:43 +0000 (11:58 +0000)
src/GraphBase/DataFlowBase_Graph.cxx

index 6943ba82addfa881942e152a456849a845323c34..a078c051c293de0de48fcc9db3051313dc0e32a3 100644 (file)
@@ -1487,6 +1487,22 @@ bool GraphBase::Graph::RemoveLink( const char* FromNodeName ,
          }
           else {
             fromNode->RemoveLinkedNode( toNode ) ;
+           // mkr : PAL12575 -->
+           if ( fromNode->IsGOTONode() ) {
+             GraphBase::GOTONode * aGOTONode = (GraphBase::GOTONode * ) fromNode ;
+             if ( aGOTONode->CoupledNode() && strcmp( aGOTONode->CoupledNode()->Name(), toNode->Name() ) == 0 ) {
+               aGOTONode->CoupledNode(NULL);
+               aGOTONode->CoupledNodeName("");
+               
+               // set ExternConnected status for output data port of GoTo node
+               for ( int aPortId = 0 ; aPortId < fromNode->GetNodeOutPortsSize() ; aPortId++ ) {
+                 GraphBase::OutPort * anOutPort = fromNode->GetChangeNodeOutPort(aPortId) ;
+                 if ( anOutPort->IsNotConnected() && !anOutPort->IsGate() )
+                   anOutPort->PortStatus( ExternConnected ) ;
+               }
+             }
+           }
+           // mkr : PAL12575 <--
          }
         }
 //JR PAL7990 : a SwitchPort is an OutPort of a SwitchNode connected to a InGate Port
@@ -3020,7 +3036,7 @@ bool GraphBase::Graph::DataServerNodes() const {
         const GraphBase::OutPort * anOutPort = aNode->GetNodeOutPort(j) ;
 //JR Debug 06.06.2005 : if it is not a Gate !
 //        if ( anOutPort->IsNotConnected() ) {
-        if ( anOutPort->IsNotConnected() && !anOutPort->IsGate() ) {
+        if ( anOutPort->IsNotConnected() && !anOutPort->IsGate() && !aNode->IsGOTONode() ) { // mkr : PAL12575
           cdebug << "Graph::DataServerNodes Add[Stream]LinkedNode for OutPort "
                  << aNode->Name() << "( " << anOutPort->PortName() << " , "
                  << anOutPort->PortStatus() << " )" << endl ;