diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp
index abcdb10dcf..3530eb3f3e 100644
--- a/src/html/helpfrm.cpp
+++ b/src/html/helpfrm.cpp
@@ -1419,7 +1419,7 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
&m_Data->GetContentsArray()[ind];
while (ind >= 0 && it->level != level)
{
- ind--, it--;
+ ind--;
it = &m_Data->GetContentsArray()[ind];
}
if (ind >= 0)