Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2012-12-21 13:12:07 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2012-12-21 13:12:07 +0400
commit47db48c0d2612219445a27bc5e193620fc4ab047 (patch)
treea7f15fd3c71c313ec42cab0e04a52d2a4c011266
parentc8c619a095b8eaba7a1084aedc15c15993c4849e (diff)
Avoid using the handle of a released icon.
-rw-r--r--common/DSUtilLite/BaseTrayIcon.cpp4
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)