1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0027070: Segfault when transferring HLR-created shapes via STEPControl_Writer

Added protection against null shape on writing: status IFSelect_RetVoid will be returned in such case (instead of access violation)
This commit is contained in:
abv
2018-03-08 09:56:01 +03:00
committed by bugmaster
parent 1167d6cc50
commit 0a0eec807d
2 changed files with 12 additions and 1 deletions

View File

@@ -458,7 +458,10 @@ IFSelect_ReturnStatus XSControl_WorkSession::TransferWriteShape (const TopoDS_Sh
IFSelect_ReturnStatus status;
if (myController.IsNull()) return IFSelect_RetError;
const Handle(Interface_InterfaceModel) &model = Model();
if (model.IsNull()) return IFSelect_RetVoid;
if (model.IsNull() || shape.IsNull())
{
return IFSelect_RetVoid;
}
status = myTransferWriter->TransferWriteShape (model,shape);
// qui s occupe de tout, try/catch inclus