FIX:Array out of bounds protection

jira: STUDIO-10538
Change-Id: Id924495fe4edcedf48e79fa0deffdd6bb98d69cf
This commit is contained in:
zhou.xu 2025-02-21 11:04:10 +08:00 committed by lane.wei
parent 2421cd430d
commit 44fd34d4f7
1 changed files with 5 additions and 2 deletions

View File

@ -1173,8 +1173,11 @@ void PrintErrorDialog::msw_rescale() {
void PrintErrorDialog::rescale()
{
for(auto used_button:m_used_button)
m_button_list[used_button]->Rescale();
for (auto used_button : m_used_button) {
if (m_button_list.find(used_button) != m_button_list.end()) {
m_button_list[used_button]->Rescale();
}
}
}
ConfirmBeforeSendDialog::ConfirmBeforeSendDialog(wxWindow* parent, wxWindowID id, const wxString& title, enum ButtonStyle btn_style, const wxPoint& pos, const wxSize& size, long style, bool not_show_again_check)