0027104: DownCast() cannot return null for mismatched handle
[occt.git] / src / StdObjMgt / StdObjMgt_ReadData.hxx
index 3f63914..09b2ee8 100644 (file)
@@ -51,7 +51,7 @@ public:
   {
     Handle(StdObjMgt_Persistent) aTarget = theTarget;
     ReadReference (aTarget);
-    theTarget = Handle(Type)::DownCast (aTarget);
+    theTarget = dynamic_cast<Type*> (aTarget.get());
     return *this;
   }