check that the bitmap is valid before getting its size to avoid asserts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -389,9 +389,11 @@ void wxAnimationCtrl::RebuildBackingStoreUpToFrame(size_t frame)
|
|||||||
int w = wxMin(sz.GetWidth(), winsz.GetWidth());
|
int w = wxMin(sz.GetWidth(), winsz.GetWidth());
|
||||||
int h = wxMin(sz.GetHeight(), winsz.GetHeight());
|
int h = wxMin(sz.GetHeight(), winsz.GetHeight());
|
||||||
|
|
||||||
if (m_backingStore.GetWidth() < w ||
|
if ( !m_backingStore.Ok() ||
|
||||||
m_backingStore.GetHeight() < h)
|
m_backingStore.GetWidth() < w || m_backingStore.GetHeight() < h )
|
||||||
|
{
|
||||||
m_backingStore.Create(w, h);
|
m_backingStore.Create(w, h);
|
||||||
|
}
|
||||||
|
|
||||||
wxMemoryDC dc;
|
wxMemoryDC dc;
|
||||||
dc.SelectObject(m_backingStore);
|
dc.SelectObject(m_backingStore);
|
||||||
|
Reference in New Issue
Block a user