FIX: accessing wild pointer of HMSNotifyItem

jira: [STUDIO-10270]
Change-Id: I942876148dac93f3a03df3311048e7e4c38ec277
This commit is contained in:
xin.zhang 2025-02-12 14:49:25 +08:00 committed by lane.wei
parent c13bea9b17
commit 1eb7b02b06
1 changed files with 8 additions and 7 deletions

View File

@ -119,10 +119,11 @@ HMSNotifyItem::HMSNotifyItem(const std::string& dev_id, wxWindow *parent, HMSIte
}
});
m_hms_content->Bind(wxEVT_LEFT_UP, [this](wxMouseEvent& e) {
if (!m_url.empty()) wxLaunchDefaultBrowser(m_url);
wxCommandEvent evt(EVT_ALREADY_READ_HMS);
evt.SetString(long_error_code);
wxPostEvent(wxGetApp().mainframe->m_monitor, evt);
if (!m_url.empty()) wxLaunchDefaultBrowser(m_url);
});
#endif
}