diff --git a/src/GEOM_I/GEOM_Object_i.cc b/src/GEOM_I/GEOM_Object_i.cc index 3d1e9c686..6b243bd59 100644 --- a/src/GEOM_I/GEOM_Object_i.cc +++ b/src/GEOM_I/GEOM_Object_i.cc @@ -207,10 +207,8 @@ void GEOM_Object_i::SetName(const char* theName) //============================================================================= char* GEOM_Object_i::GetName() { - char* aName = _impl->GetName(); - if (aName) - return aName; // this is already copy of pointer (see implementation of _impl) - return CORBA::string_dup(""); + TCollection_AsciiString aName = _impl->GetName(); + return CORBA::string_dup( aName.ToCString() ); } //=============================================================================