mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-18 14:27:39 +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:
@@ -2527,7 +2527,7 @@ Standard_Boolean STEPCAFControl_Reader::setDatumToXCAF(const Handle(StepDimTol_D
|
||||
|
||||
// Create datum target object
|
||||
if (isValidDT) {
|
||||
TDF_Label aDatL = aDGTTool->AddDatum();
|
||||
TDF_Label aDatL = aDGTTool->AddDatum(theDat->Name(), theDat->Description(), theDat->Identification());
|
||||
myGDTMap.Bind(aDT, aDatL);
|
||||
aDGTTool->Lock(aDatL);
|
||||
aDat = XCAFDoc_Datum::Set(aDatL);
|
||||
@@ -2549,7 +2549,7 @@ Standard_Boolean STEPCAFControl_Reader::setDatumToXCAF(const Handle(StepDimTol_D
|
||||
|
||||
if (aShapeLabels.Length() > 0 || !isExistDatumTarget) {
|
||||
// Create object for datum
|
||||
TDF_Label aDatL = aDGTTool->AddDatum();
|
||||
TDF_Label aDatL = aDGTTool->AddDatum(theDat->Name(), theDat->Description(), theDat->Identification());
|
||||
myGDTMap.Bind(theDat, aDatL);
|
||||
// bind datum label with all reference datum_feature entities
|
||||
for (Standard_Integer i = 1; i <= aSAs.Length(); i++) {
|
||||
|
Reference in New Issue
Block a user