diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-12-21 13:12:07 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-12-21 13:12:07 +0400 |
commit | 47db48c0d2612219445a27bc5e193620fc4ab047 (patch) | |
tree | a7f15fd3c71c313ec42cab0e04a52d2a4c011266 | |
parent | c8c619a095b8eaba7a1084aedc15c15993c4849e (diff) |
Avoid using the handle of a released icon.
-rw-r--r-- | common/DSUtilLite/BaseTrayIcon.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/DSUtilLite/BaseTrayIcon.cpp b/common/DSUtilLite/BaseTrayIcon.cpp index 5ed5d8a5..1497cd3b 100644 --- a/common/DSUtilLite/BaseTrayIcon.cpp +++ b/common/DSUtilLite/BaseTrayIcon.cpp @@ -49,8 +49,10 @@ CBaseTrayIcon::~CBaseTrayIcon(void) Shell_NotifyIcon(NIM_DELETE, &m_NotifyIconData); // Free icon resources - if (m_NotifyIconData.hIcon) + if (m_NotifyIconData.hIcon) { DestroyIcon(m_NotifyIconData.hIcon); + m_NotifyIconData.hIcon = NULL; + } // Instruct the window to destroy itself if (m_hWnd) |