0026377: Passing Handle objects as arguments to functions as non-const reference...
[occt.git] / src / StepData / StepData_StepReaderTool.cxx
index 5ab5db6..074352a 100644 (file)
@@ -211,9 +211,14 @@ Standard_Boolean StepData_StepReaderTool::AnalyseRecord
    Handle(Interface_Check)& acheck)
 {
   DeclareAndCast(StepData_StepReaderData,stepdat,Data());
-  Handle(StepData_ReadWriteModule) module;  Standard_Integer CN;
-  if (therlib.Select(anent,module,CN))
+  Handle(Interface_ReaderModule) imodule;
+  Standard_Integer CN;
+  if (therlib.Select(anent,imodule,CN))
+  {
+    Handle(StepData_ReadWriteModule) module =
+      Handle(StepData_ReadWriteModule)::DownCast (imodule);
     module->ReadStep(CN,stepdat,num,acheck,anent);
+  }
   else {
 //  Pas trouve : tenter UndefinedEntity de StepData
     DeclareAndCast(StepData_UndefinedEntity,und,anent);