diff --git a/src/html/helpwnd.cpp b/src/html/helpwnd.cpp
index 51e081117d..e9aac75806 100644
--- a/src/html/helpwnd.cpp
+++ b/src/html/helpwnd.cpp
@@ -1503,7 +1503,9 @@ void wxHtmlHelpWindow::OnToolbar(wxCommandEvent& event)
{
m_BookmarksNames.RemoveAt(pos);
m_BookmarksPages.RemoveAt(pos);
- m_Bookmarks->Delete(m_Bookmarks->GetSelection());
+ pos = m_Bookmarks->GetSelection();
+ wxASSERT_MSG( pos != wxNOT_FOUND , wxT("Unknown bookmark position") ) ;
+ m_Bookmarks->Delete((unsigned int)pos);
}
}
break;