FIX: accessing wild pointer of HMSNotifyItem

jira: [STUDIO-10270]
Change-Id: I942876148dac93f3a03df3311048e7e4c38ec277
(cherry picked from commit 1eb7b02b0679c03e8fa535ddf0671af1f9b971d7)
This commit is contained in:
xin.zhang
2025-02-12 14:49:25 +08:00
committed by Noisyfox
parent 8d354aef55
commit ff4027a7ae

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) { m_hms_content->Bind(wxEVT_LEFT_UP, [this](wxMouseEvent& e) {
if (!m_url.empty()) wxLaunchDefaultBrowser(m_url);
wxCommandEvent evt(EVT_ALREADY_READ_HMS); wxCommandEvent evt(EVT_ALREADY_READ_HMS);
evt.SetString(long_error_code); evt.SetString(long_error_code);
wxPostEvent(wxGetApp().mainframe->m_monitor, evt); wxPostEvent(wxGetApp().mainframe->m_monitor, evt);
if (!m_url.empty()) wxLaunchDefaultBrowser(m_url);
}); });
#endif #endif
} }