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:
@@ -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
|
||||
|
Reference in New Issue
Block a user