From 6a66f54c797014484740f87897e6da63210a5708 Mon Sep 17 00:00:00 2001 From: Tim Kosse Date: Thu, 19 Jun 2014 09:29:07 +0000 Subject: [PATCH] wxBitmap::GetMask() asserts on invalid bitmap. Check for valid bitmap before calling GetMask(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/animateg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/animateg.cpp b/src/generic/animateg.cpp index f267c21cdb..dd2adecffc 100644 --- a/src/generic/animateg.cpp +++ b/src/generic/animateg.cpp @@ -358,7 +358,7 @@ void wxAnimationCtrl::SetInactiveBitmap(const wxBitmap &bmp) // (which uses the bitmap's mask), our background colour would be used for // transparent areas - and that's not what we want (at least for // consistency with the GTK version) - if ( bmp.GetMask() != NULL && GetParent() != NULL ) + if ( bmp.IsOk() && bmp.GetMask() != NULL && GetParent() != NULL ) SetBackgroundColour(GetParent()->GetBackgroundColour()); wxAnimationCtrlBase::SetInactiveBitmap(bmp);