From 4b7dccb1011adaf562587a9ce2f2171c2e0b4031 Mon Sep 17 00:00:00 2001 From: mkr Date: Wed, 10 Jan 2007 11:58:43 +0000 Subject: [PATCH] Fix crash described in bug PAL12575 : Superv: GNode - unexpected abort. --- src/GraphBase/DataFlowBase_Graph.cxx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/GraphBase/DataFlowBase_Graph.cxx b/src/GraphBase/DataFlowBase_Graph.cxx index 6943ba8..a078c05 100644 --- a/src/GraphBase/DataFlowBase_Graph.cxx +++ b/src/GraphBase/DataFlowBase_Graph.cxx @@ -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 ; -- 2.39.2