diff --git a/src/generic/animateg.cpp b/src/generic/animateg.cpp index 104bead684..a7888f1350 100644 --- a/src/generic/animateg.cpp +++ b/src/generic/animateg.cpp @@ -346,6 +346,9 @@ void wxGenericAnimationCtrl::SetAnimation(const wxAnimation& animation) return; } + wxCHECK_RET(animation.GetImpl()->GetImplType() == wxANIMATION_IMPL_TYPE_GENERIC, + wxT("incorrect animation implementation type provided") ); + if (m_animation.GetBackgroundColour() == wxNullColour) SetUseWindowBackgroundColour(); if (!this->HasFlag(wxAC_NO_AUTORESIZE))