From 692570eb2b2ab5f6a4b177cc11dd4f7d7f5abc24 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 16 Jan 2007 08:43:20 +0000 Subject: [PATCH] PAL13601 (application crashes during GetAlgoState() execution) in GetAlgoState(), initialize CORBA::String_var algoName with an empty string --- src/SMESH_I/SMESH_Gen_i.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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++ ];