Checking handles using the IsNull() method.
Minor correction of compilation error (missing parentheses in function call)
isUpdate = Standard_True;
}
}
- if (isUpdate && GetDrawer()) {
+ if (isUpdate && !GetDrawer().IsNull()) {
const Handle(NIS_SurfaceDrawer) aDrawer =
static_cast<NIS_SurfaceDrawer *>(DefaultDrawer(0L));
aDrawer->Assign (GetDrawer());
myX1(X1), myY1(Y1), myX2(X2), myY2(Y2), myLayerMgr(theLayerMgr),
myType(theType), myWidth(theWidth), myTransparency(theTransp)
{
- if (myLayerMgr && myLayerMgr->Overlay())
+ if (myLayerMgr && !myLayerMgr->Overlay().IsNull())
myLayerMgr->Overlay()->AddLayerItem (this);
}