0024023: Revamp the OCCT Handle -- downcast (automatic)
[occt.git] / src / TNaming / TNaming_DeltaOnModification.cxx
index 0ab9118..14b8c26 100644 (file)
@@ -109,7 +109,7 @@ void TNaming_DeltaOnModification::Apply()
 {
 
   Handle(TDF_Attribute) TDFAttribute = Attribute();
-  Handle(TNaming_NamedShape) NS = (*((Handle(TNaming_NamedShape)*)&TDFAttribute));
+  Handle(TNaming_NamedShape) NS = Handle(TNaming_NamedShape)::DownCast (TDFAttribute);
   
 
   // If there is no attribute, reinsert the previous. Otherwise a new one