From: mkr Date: Mon, 6 Feb 2006 15:11:45 +0000 (+0000) Subject: Fix for bug PAL8150 : CRASH after "Put in Study" applied to the "readMeshInFile"... X-Git-Tag: mergeto_trunk_07Feb06 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e5ae5f2ced4982d813d3930b2e91144e769c27bb;p=modules%2Fsuperv.git Fix for bug PAL8150 : CRASH after "Put in Study" applied to the "readMeshInFile" node. --- diff --git a/src/SUPERVGUI/SUPERVGUI_Main.cxx b/src/SUPERVGUI/SUPERVGUI_Main.cxx index 6cd32b7..49c4b88 100644 --- a/src/SUPERVGUI/SUPERVGUI_Main.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Main.cxx @@ -1099,12 +1099,11 @@ bool SUPERVGUI_Main::putDataStudy( SUPERV_Port p, const char* inout ) { if ( !aSStudy ) return false; try { aTmpSO = aDriver->PublishInStudy( aSStudy->GetStudy(), aTmpSO, anObject, "" ); + aBuilder->Addreference(aSO, _PTR(SObject)(new SALOMEDS_SObject( aTmpSO )) ); + PublishOtherComponent = true; } catch ( ... ) { // mkr : PAL8150 - return false; } - aBuilder->Addreference(aSO, _PTR(SObject)(new SALOMEDS_SObject( aTmpSO )) ); - PublishOtherComponent = true; } else { // can't publish object: abort transaction MESSAGE( "CanPublishInStudy() returned FALSE. ok, AbortCommand.." );