Ensure the animation is ok before getting its impl

This commit is contained in:
Robin Dunn
2020-04-01 12:58:35 -07:00
parent 606f365ea3
commit cd74255da3

View File

@@ -346,6 +346,9 @@ void wxGenericAnimationCtrl::SetAnimation(const wxAnimation& animation)
return; return;
} }
wxCHECK_RET(animation.GetImpl()->GetImplType() == wxANIMATION_IMPL_TYPE_GENERIC,
wxT("incorrect animation implementation type provided") );
if (m_animation.GetBackgroundColour() == wxNullColour) if (m_animation.GetBackgroundColour() == wxNullColour)
SetUseWindowBackgroundColour(); SetUseWindowBackgroundColour();
if (!this->HasFlag(wxAC_NO_AUTORESIZE)) if (!this->HasFlag(wxAC_NO_AUTORESIZE))