From: eap Date: Tue, 16 Jan 2007 08:43:20 +0000 (+0000) Subject: PAL13601 (application crashes during GetAlgoState() execution) X-Git-Tag: V3_2_5pre1~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=692570eb2b2ab5f6a4b177cc11dd4f7d7f5abc24;p=modules%2Fsmesh.git PAL13601 (application crashes during GetAlgoState() execution) in GetAlgoState(), initialize CORBA::String_var algoName with an empty string --- diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 77cdfad14..431c14cb9 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -939,7 +939,7 @@ SMESH::algo_error_array* SMESH_Gen_i::GetAlgoState( SMESH::SMESH_Mesh_ptr theMes THROW_SALOME_CORBA_EXCEPTION( "bad error name",SALOME::BAD_PARAM ); } // algo name - CORBA::String_var algoName; + CORBA::String_var algoName = ""; if ( error->_algo ) { if ( !myCurrentStudy->_is_nil() ) { // find algo in the study @@ -969,7 +969,7 @@ SMESH::algo_error_array* SMESH_Gen_i::GetAlgoState( SMESH::SMESH_Mesh_ptr theMes } if ( algoName.in() == 0 ) // use algo type name - algoName = CORBA::string_dup( error->_algo->GetName() ); + algoName = error->_algo->GetName(); } // fill AlgoStateError structure SMESH::AlgoStateError & errStruct = error_array[ i++ ];