From cd74255da3295c8032a5f8275a6c1935fe543a14 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 1 Apr 2020 12:58:35 -0700 Subject: [PATCH] Ensure the animation is ok before getting its impl --- src/generic/animateg.cpp | 3 +++ 1 file changed, 3 insertions(+) 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))