mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
0023261: Checking handle value against NULL
Checking handles using the IsNull() method. Minor correction of compilation error (missing parentheses in function call)
This commit is contained in:
parent
f272f76c5a
commit
9e4c2fbb29
@ -486,7 +486,7 @@ void NIS_Surface::SetDisplayMode (const NIS_Surface::DisplayMode theMode)
|
|||||||
isUpdate = Standard_True;
|
isUpdate = Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isUpdate && GetDrawer()) {
|
if (isUpdate && !GetDrawer().IsNull()) {
|
||||||
const Handle(NIS_SurfaceDrawer) aDrawer =
|
const Handle(NIS_SurfaceDrawer) aDrawer =
|
||||||
static_cast<NIS_SurfaceDrawer *>(DefaultDrawer(0L));
|
static_cast<NIS_SurfaceDrawer *>(DefaultDrawer(0L));
|
||||||
aDrawer->Assign (GetDrawer());
|
aDrawer->Assign (GetDrawer());
|
||||||
|
@ -2425,7 +2425,7 @@ V3d_LineItem::V3d_LineItem(Standard_Real X1, Standard_Real Y1,
|
|||||||
myX1(X1), myY1(Y1), myX2(X2), myY2(Y2), myLayerMgr(theLayerMgr),
|
myX1(X1), myY1(Y1), myX2(X2), myY2(Y2), myLayerMgr(theLayerMgr),
|
||||||
myType(theType), myWidth(theWidth), myTransparency(theTransp)
|
myType(theType), myWidth(theWidth), myTransparency(theTransp)
|
||||||
{
|
{
|
||||||
if (myLayerMgr && myLayerMgr->Overlay())
|
if (myLayerMgr && !myLayerMgr->Overlay().IsNull())
|
||||||
myLayerMgr->Overlay()->AddLayerItem (this);
|
myLayerMgr->Overlay()->AddLayerItem (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user