X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1bd2ceb57b0cc9f2b07b8bbb7d38d0e0d2381d3a..588f410058fc3d867c6e7ae3a19540fc1343c53f:/src/generic/animateg.cpp diff --git a/src/generic/animateg.cpp b/src/generic/animateg.cpp index dbdc6665d1..f69ba2dd86 100644 --- a/src/generic/animateg.cpp +++ b/src/generic/animateg.cpp @@ -583,7 +583,8 @@ void wxAnimationCtrl::DisposeToBackground() // clear the backing store wxMemoryDC dc; dc.SelectObject(m_backingStore); - DisposeToBackground(dc); + if ( dc.IsOk() ) + DisposeToBackground(dc); } void wxAnimationCtrl::DisposeToBackground(wxDC& dc)