mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +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:
@@ -174,7 +174,7 @@ void OpenGl_View::Redraw()
|
||||
// fetch OpenGl context state
|
||||
aCtx->FetchState();
|
||||
|
||||
OpenGl_FrameBuffer* aFrameBuffer = myFBO.operator->();
|
||||
OpenGl_FrameBuffer* aFrameBuffer = myFBO.get();
|
||||
bool toSwap = aCtx->IsRender()
|
||||
&& !aCtx->caps->buffersNoSwap
|
||||
&& aFrameBuffer == NULL;
|
||||
@@ -600,7 +600,7 @@ void OpenGl_View::RedrawImmediate()
|
||||
|
||||
const Graphic3d_StereoMode aStereoMode = myRenderParams.StereoMode;
|
||||
Graphic3d_Camera::Projection aProjectType = myCamera->ProjectionType();
|
||||
OpenGl_FrameBuffer* aFrameBuffer = myFBO.operator->();
|
||||
OpenGl_FrameBuffer* aFrameBuffer = myFBO.get();
|
||||
aCtx->FrameStats()->FrameStart (myWorkspace->View(), true);
|
||||
|
||||
if ( aFrameBuffer == NULL
|
||||
|
Reference in New Issue
Block a user