From: mkr Date: Mon, 6 Feb 2006 14:54:33 +0000 (+0000) Subject: Fix for bug PAL8150 : CRASH after "Put in Study" applied to the "readMeshInFile"... X-Git-Tag: mergeto_trunk_07Feb06~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c860a5706f3b2cdd9628f8151e55d4bc6399ce54;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 bd23eaa..6cd32b7 100644 --- a/src/SUPERVGUI/SUPERVGUI_Main.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Main.cxx @@ -564,7 +564,7 @@ void SUPERVGUI_Main::onShowToolbar() aVF->getToolBar()->show(); } -// mkr : PAL8237 : synchronize many views of the same dataflow +// mkr : PAL8237 : synchronize many views of the same dataflow (objects creation/deletion) void SUPERVGUI_Main::onObjectCreatedDeleted() { if ( study ) { @@ -1097,7 +1097,12 @@ bool SUPERVGUI_Main::putDataStudy( SUPERV_Port p, const char* inout ) { SALOMEDS::SObject_var aTmpSO;// = aSO; SALOMEDS_Study* aSStudy = dynamic_cast( aStudy.get() ); if ( !aSStudy ) return false; - aTmpSO = aDriver->PublishInStudy( aSStudy->GetStudy(), aTmpSO, anObject, "" ); + try { + aTmpSO = aDriver->PublishInStudy( aSStudy->GetStudy(), aTmpSO, anObject, "" ); + } + catch ( ... ) { // mkr : PAL8150 + return false; + } aBuilder->Addreference(aSO, _PTR(SObject)(new SALOMEDS_SObject( aTmpSO )) ); PublishOtherComponent = true; }