diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp index 5ac040b271..2c5ea56421 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -460,6 +460,8 @@ size_t wxCmdLineParser::GetParamCount() const wxString wxCmdLineParser::GetParam(size_t n) const { + wxCHECK_MSG( n < GetParamCount(), wxEmptyString, _T("invalid param index") ); + return m_data->m_parameters[n]; }