mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0031825: Data Exchange, STEP - NULL dereference while re-exporting model with empty Datum description
Fix adding name and description of the datum
This commit is contained in:
@@ -3466,8 +3466,12 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTs (const Handle(XSControl_WorkSe
|
||||
Handle(XCAFDoc_Datum) DatumAttr;
|
||||
if(!DatumL.FindAttribute(XCAFDoc_Datum::GetID(),DatumAttr)) continue;
|
||||
Handle(TCollection_HAsciiString) aName = DatumAttr->GetName();
|
||||
Handle(TCollection_HAsciiString) aDescription = DatumAttr->GetDescription();
|
||||
Handle(TCollection_HAsciiString) anIdentification = DatumAttr->GetIdentification();
|
||||
Handle(TCollection_HAsciiString) aDescription = DatumAttr->GetDescription();
|
||||
if (aDescription.IsNull())
|
||||
{
|
||||
aDescription = new TCollection_HAsciiString();
|
||||
}
|
||||
Handle(StepDimTol_DatumFeature) DF = new StepDimTol_DatumFeature;
|
||||
Handle(StepDimTol_Datum) aDatum = new StepDimTol_Datum;
|
||||
DF->Init(aName, new TCollection_HAsciiString, PDS, StepData_LTrue);
|
||||
|
Reference in New Issue
Block a user