0027104: DownCast() cannot return null for mismatched handle
[occt.git] / src / STEPSelections / STEPSelections_SelectInstances.cxx
index ff263f2..bc4e8ea 100644 (file)
@@ -102,7 +102,7 @@ static void AddInstances(const Handle(Standard_Transient)& start,
 
   if (start->IsKind(STANDARD_TYPE(StepShape_ContextDependentShapeRepresentation))) {
     DeclareAndCast(StepShape_ContextDependentShapeRepresentation,CDSR,start);
-    DeclareAndCast(StepRepr_RepresentationRelationship,SRR,CDSR->RepresentationRelation());
+    Handle(StepRepr_RepresentationRelationship) SRR = CDSR->RepresentationRelation();
     if ( SRR.IsNull() ) return ;
     
     Handle(StepRepr_Representation) rep;