diff --git a/include/IECore/RunTimeTyped.inl b/include/IECore/RunTimeTyped.inl index 584942bbd4..4a01bf8f37 100644 --- a/include/IECore/RunTimeTyped.inl +++ b/include/IECore/RunTimeTyped.inl @@ -71,14 +71,14 @@ T *runTimeCast( S *src ) template boost::intrusive_ptr assertedStaticCast( const boost::intrusive_ptr &src ) { - assert( runTimeCast( src ) ); + assert( runTimeCast( src ) == src ); // NOTE : see boost polymorphic_downcast return boost::static_pointer_cast( src ); } template T* assertedStaticCast( S* src ) { - assert( runTimeCast( src ) ); + assert( runTimeCast( src ) == src ); // NOTE : see boost polymorphic_downcast return static_cast( src ); }