diff --git a/Modules/Core/ObjectList/include/otbObjectList.txx b/Modules/Core/ObjectList/include/otbObjectList.txx index 121dfd90b01678a16fd501c76862bba7f5bab064..1542fec5119451b910a27a323ec6fdaee2a964b8 100644 --- a/Modules/Core/ObjectList/include/otbObjectList.txx +++ b/Modules/Core/ObjectList/include/otbObjectList.txx @@ -168,8 +168,7 @@ typename ObjectList<TObject>::Superclass * ObjectList<TObject> ::GetNthDataObject(unsigned int index) const { - ObjectType * object = GetNthElement(index).GetPointer(); - return dynamic_cast< Superclass * > ( object ); + return GetNthElement(index).GetPointer(); } /**