diff --git a/src/html/m_image.cpp b/src/html/m_image.cpp
index d16040fc77..27e0f93977 100644
--- a/src/html/m_image.cpp
+++ b/src/html/m_image.cpp
@@ -304,9 +304,10 @@ public:
#if wxUSE_GIF && wxUSE_TIMER
void AdvanceAnimation(wxTimer *timer);
- virtual void Layout(int w) wxOVERRIDE;
#endif
+ virtual void Layout(int w) wxOVERRIDE;
+
private:
wxBitmap *m_bitmap;
int m_align;
@@ -538,6 +539,7 @@ void wxHtmlImageCell::AdvanceAnimation(wxTimer *timer)
delay = 1;
timer->Start(delay, true);
}
+#endif
void wxHtmlImageCell::Layout(int w)
{
@@ -571,10 +573,10 @@ void wxHtmlImageCell::Layout(int w)
}
wxHtmlCell::Layout(w);
+#if wxUSE_GIF && wxUSE_TIMER
m_physX = m_physY = wxDefaultCoord;
-}
-
#endif
+}
wxHtmlImageCell::~wxHtmlImageCell()
{