diff --git a/src/unix/taskbarx11.cpp b/src/unix/taskbarx11.cpp index 55e11e8bdf..6c3af3359f 100644 --- a/src/unix/taskbarx11.cpp +++ b/src/unix/taskbarx11.cpp @@ -263,7 +263,10 @@ wxTaskBarIcon::wxTaskBarIcon() : m_iconWnd(NULL) wxTaskBarIcon::~wxTaskBarIcon() { if (m_iconWnd) + { + m_iconWnd->Disconnect(wxEVT_DESTROY, NULL, NULL, this); RemoveIcon(); + } } bool wxTaskBarIcon::IsOk() const