mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 10:10:34 +05:00
fix uninitialized variable
This commit is contained in:
parent
91ba4a3a87
commit
bd18132032
@ -161,7 +161,7 @@ GEOMImpl_IFieldOperations::GetFields( const Handle(GEOM_Object)& theShape )
|
|||||||
{
|
{
|
||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
Handle(TColStd_HSequenceOfTransient) fields;
|
Handle(TColStd_HSequenceOfTransient) fields = new TColStd_HSequenceOfTransient;
|
||||||
if ( theShape.IsNull() ) {
|
if ( theShape.IsNull() ) {
|
||||||
SetErrorCode( "Error: NULL shape" );
|
SetErrorCode( "Error: NULL shape" );
|
||||||
return fields;
|
return fields;
|
||||||
@ -180,10 +180,13 @@ GEOMImpl_IFieldOperations::GetFields( const Handle(GEOM_Object)& theShape )
|
|||||||
for (; anIt.More(); anIt.Next()) {
|
for (; anIt.More(); anIt.Next()) {
|
||||||
TCollection_ExtendedString& anEntry = anIt.Value();
|
TCollection_ExtendedString& anEntry = anIt.Value();
|
||||||
anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
|
anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
|
||||||
Handle(GEOM_Field) field = Handle(GEOM_Field)::DownCast
|
Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(GetDocID(), entry, false);
|
||||||
( GetEngine()->GetObject( GetDocID(), entry, false ));
|
if ( !anObj.IsNull() && anObj->IsKind(STANDARD_TYPE(GEOM_Field)) )
|
||||||
if ( !field.IsNull() )
|
{
|
||||||
fields->Append( field );
|
Handle(GEOM_Field) field = Handle(GEOM_Field)::DownCast( anObj );
|
||||||
|
if ( !field.IsNull() )
|
||||||
|
fields->Append( field );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return fields;
|
return fields;
|
||||||
|
Loading…
Reference in New Issue
Block a user