mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-18 07:57:31 +08:00
0031842: Coding Rules, BOPAlgo - eliminate CLang warning -fsanitize=undefined reference binding to null pointer
Added NULL checks before Progress Scope pointer dereference.
This commit is contained in:
@@ -125,7 +125,10 @@ void BRepAlgoAPI_BuilderAlgo::IntersectShapes(const TopTools_ListOfShape& theArg
|
||||
myDSFiller->SetArguments(theArgs);
|
||||
// Set options for intersection
|
||||
myDSFiller->SetRunParallel(myRunParallel);
|
||||
myDSFiller->SetProgressIndicator(*myProgressScope);
|
||||
if (myProgressScope != NULL)
|
||||
{
|
||||
myDSFiller->SetProgressIndicator(*myProgressScope);
|
||||
}
|
||||
myDSFiller->SetFuzzyValue(myFuzzyValue);
|
||||
myDSFiller->SetNonDestructive(myNonDestructive);
|
||||
myDSFiller->SetGlue(myGlue);
|
||||
@@ -145,7 +148,10 @@ void BRepAlgoAPI_BuilderAlgo::BuildResult()
|
||||
{
|
||||
// Set options to the builder
|
||||
myBuilder->SetRunParallel(myRunParallel);
|
||||
myBuilder->SetProgressIndicator(*myProgressScope);
|
||||
if (myProgressScope != NULL)
|
||||
{
|
||||
myBuilder->SetProgressIndicator(*myProgressScope);
|
||||
}
|
||||
myBuilder->SetCheckInverted(myCheckInverted);
|
||||
myBuilder->SetToFillHistory(myFillHistory);
|
||||
// Perform building of the result with pre-calculated intersections
|
||||
|
||||
@@ -94,7 +94,10 @@ void BRepAlgoAPI_Check::Perform()
|
||||
anAnalyzer.SelfInterMode() = myTestSI;
|
||||
// Set options from BOPAlgo_Options
|
||||
anAnalyzer.SetRunParallel(myRunParallel);
|
||||
anAnalyzer.SetProgressIndicator(*myProgressScope);
|
||||
if (myProgressScope != NULL)
|
||||
{
|
||||
anAnalyzer.SetProgressIndicator(*myProgressScope);
|
||||
}
|
||||
anAnalyzer.SetFuzzyValue(myFuzzyValue);
|
||||
// Perform the check
|
||||
anAnalyzer.Perform();
|
||||
|
||||
Reference in New Issue
Block a user