diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp
index 4d2327bd49..826db3742d 100644
--- a/src/html/htmlwin.cpp
+++ b/src/html/htmlwin.cpp
@@ -1556,6 +1556,8 @@ void wxHtmlWindow::SetHTMLStatusText(const wxString& text)
#if wxUSE_STATUSBAR
if (m_RelatedStatusBar != -1)
m_RelatedFrame->SetStatusText(text, m_RelatedStatusBar);
+#else
+ wxUnusedVar(text);
#endif // wxUSE_STATUSBAR
}