X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/54cbdc641494472360fe8f51a58b7443ffeaeaff..17d98558b35b75e3cad68d96841b4fa5a0c7e6ee:/src/common/docview.cpp diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 69e5061128..e2ff18c915 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -1087,7 +1087,7 @@ void wxDocManager::OnMRUFile(wxCommandEvent& event) // Check if the id is in the range assigned to MRU list entries. const int id = event.GetId(); if ( id >= wxID_FILE1 && - id < wxID_FILE1 + m_fileHistory->GetBaseId() ) + id < wxID_FILE1 + static_cast(m_fileHistory->GetCount()) ) { DoOpenMRUFile(id - wxID_FILE1); }