mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -177,7 +177,7 @@ void Storage_BucketOfPersistent::Append(const Handle(Standard_Persistent)& sp)
|
||||
|
||||
if (myCurrentBucket->myCurrentSpace != myBucketSize) {
|
||||
myLength++;
|
||||
myCurrentBucket->mySpace[myCurrentBucket->myCurrentSpace] = sp.operator->();
|
||||
myCurrentBucket->mySpace[myCurrentBucket->myCurrentSpace] = sp.get();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ void Storage_BucketOfPersistent::Append(const Handle(Standard_Persistent)& sp)
|
||||
myCurrentBucket = myBuckets[myCurrentBucketNumber];
|
||||
myCurrentBucket->myCurrentSpace++;
|
||||
myLength++;
|
||||
myCurrentBucket->mySpace[myCurrentBucket->myCurrentSpace] = sp.operator->();
|
||||
myCurrentBucket->mySpace[myCurrentBucket->myCurrentSpace] = sp.get();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
Reference in New Issue
Block a user