0027104: DownCast() cannot return null for mismatched handle
[occt.git] / src / AIS / AIS_LocalContext.cxx
index 367df8f..2f1ccd9 100644 (file)
@@ -1006,8 +1006,10 @@ void AIS_LocalContext::ClearObjects()
 //       myMainPM->Clear(SO,CurAtt->DisplayMode());}
       }
       else {
-       if (CurAtt->IsSubIntensityOn()){
-         myCTX->SubIntensityOff(Handle(AIS_InteractiveObject)::DownCast(SO));}
+       if (CurAtt->IsSubIntensityOn())
+        {
+          myCTX->SubIntensityOff(SO);
+        }
        Standard_Integer DiMo = SO->HasDisplayMode()?
          SO->DisplayMode():myCTX->DisplayMode();
        if(CurAtt->DisplayMode()!=-1 &&