]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/animateg.cpp
Compile fix.
[wxWidgets.git] / src / generic / animateg.cpp
index 2ab49659dd08e509f89c204ab8a1dbcc16a71642..90cb3cae6a0416ed63b1124319505ca426bdf88b 100644 (file)
@@ -389,9 +389,11 @@ void wxAnimationCtrl::RebuildBackingStoreUpToFrame(size_t frame)
     int w = wxMin(sz.GetWidth(), winsz.GetWidth());
     int h = wxMin(sz.GetHeight(), winsz.GetHeight());
 
-    if (m_backingStore.GetWidth() < w ||
-        m_backingStore.GetHeight() < h)
+    if ( !m_backingStore.Ok() ||
+            m_backingStore.GetWidth() < w || m_backingStore.GetHeight() < h )
+    {
         m_backingStore.Create(w, h);
+    }
 
     wxMemoryDC dc;
     dc.SelectObject(m_backingStore);