X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/72045d5768a126191a907bc640c28e81a11afdd6..fe9fb970bbcf5be35c18cc526b12fd08c7644652:/src/html/m_image.cpp diff --git a/src/html/m_image.cpp b/src/html/m_image.cpp index 80d6dba87b..d2fbb26652 100644 --- a/src/html/m_image.cpp +++ b/src/html/m_image.cpp @@ -15,7 +15,7 @@ #if wxUSE_HTML && wxUSE_STREAMS -#ifndef WXPRECOMP +#ifndef WX_PRECOMP #include "wx/dynarray.h" #include "wx/dc.h" #include "wx/scrolwin.h" @@ -388,7 +388,10 @@ wxHtmlImageCell::wxHtmlImageCell(wxHtmlWindowInterface *windowIface, if ( m_gifDecoder->IsAnimation() ) { m_gifTimer = new wxGIFTimer(this); - m_gifTimer->Start(m_gifDecoder->GetDelay(0), true); + long delay = m_gifDecoder->GetDelay(0); + if ( delay == 0 ) + delay = 1; + m_gifTimer->Start(delay, true); } else { @@ -522,7 +525,10 @@ void wxHtmlImageCell::AdvanceAnimation(wxTimer *timer) win->Refresh(img.HasMask(), &rect); } - timer->Start(m_gifDecoder->GetDelay(m_nCurrFrame), true); + long delay = m_gifDecoder->GetDelay(m_nCurrFrame); + if ( delay == 0 ) + delay = 1; + timer->Start(delay, true); } void wxHtmlImageCell::Layout(int w)