]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
PAL13601 (application crashes during GetAlgoState() execution)
authoreap <eap@opencascade.com>
Tue, 16 Jan 2007 08:43:20 +0000 (08:43 +0000)
committereap <eap@opencascade.com>
Tue, 16 Jan 2007 08:43:20 +0000 (08:43 +0000)
        in GetAlgoState(), initialize CORBA::String_var algoName with
        an empty string

src/SMESH_I/SMESH_Gen_i.cxx

index 77cdfad143b8b78dd3bc963c9173eb9d3d1dae90..431c14cb94961ad746b2b99dac3bdda9ba98a352 100644 (file)
@@ -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++ ];