mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0030588: Coding - avoid calling operator->() on NULL Handle
Use .get() method instead of operator->() where result can be NULL. STEPCAFControl_Reader::ReadLayers(), XCAFDoc_ColorTool, XCAFDoc_LayerTool::SetVisibility() - fixed static functions syntax.
This commit is contained in:
@@ -432,7 +432,7 @@ void XCAFDoc_LayerTool::SetVisibility (const TDF_Label& layerL,
|
||||
Handle(TDataStd_UAttribute) aUAttr;
|
||||
if (! isvisible ) {
|
||||
if (!layerL.FindAttribute(XCAFDoc::InvisibleGUID(), aUAttr)) {
|
||||
aUAttr->Set( layerL, XCAFDoc::InvisibleGUID() );
|
||||
TDataStd_UAttribute::Set( layerL, XCAFDoc::InvisibleGUID() );
|
||||
}
|
||||
}
|
||||
else layerL.ForgetAttribute( XCAFDoc::InvisibleGUID() );
|
||||
|
Reference in New Issue
Block a user