diff --git a/src/unix/taskbarx11.cpp b/src/unix/taskbarx11.cpp index d1dfc5e746..385f05d46f 100644 --- a/src/unix/taskbarx11.cpp +++ b/src/unix/taskbarx11.cpp @@ -273,8 +273,8 @@ wxTaskBarIcon::~wxTaskBarIcon() { if (m_iconWnd) { - m_iconWnd->Disconnect( - wxEVT_DESTROY, wxObjectEventFunction(NULL), NULL, this); + m_iconWnd->Disconnect(wxEVT_DESTROY, + wxWindowDestroyEventHandler(wxTaskBarIcon::OnDestroy), NULL, this); RemoveIcon(); } }