Protection against 0 (too short in general) delay in GIF animation. It caused xchm to hang just animating GIF without actually displaying anything. (affected wxgtk*; not wxx11univ not because of different implementation) --- wxWidgets-2.5.3/src/html/m_image.cpp.orig 2004-09-28 13:18:36.000000000 +0200 +++ wxWidgets-2.5.3/src/html/m_image.cpp 2005-02-20 21:06:55.564796160 +0100 @@ -337,6 +337,11 @@ DECLARE_NO_COPY_CLASS(wxGIFTimer) }; + +static int safedelay(int ms) +{ + return (ms >= 10) ? ms : 10; +} #endif @@ -390,7 +395,7 @@ if ( m_gifDecoder->IsAnimation() ) { m_gifTimer = new wxGIFTimer(this); - m_gifTimer->Start(m_gifDecoder->GetDelay(), true); + m_gifTimer->Start(safedelay(m_gifDecoder->GetDelay()), true); } else { @@ -517,7 +522,7 @@ m_window->Refresh(img.HasMask(), &rect); } - timer->Start(m_gifDecoder->GetDelay(), true); + timer->Start(safedelay(m_gifDecoder->GetDelay()), true); } void wxHtmlImageCell::Layout(int w)