From 8f90d307468f43f117cb5ca826187105ca5e1279 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 3 May 2017 22:57:37 +0300 Subject: Scriver: fix for memory corruption --- plugins/Scriver/src/infobar.cpp | 6 ------ plugins/Scriver/src/msgdialog.cpp | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'plugins/Scriver') diff --git a/plugins/Scriver/src/infobar.cpp b/plugins/Scriver/src/infobar.cpp index 11f4509a0f..2047c534d0 100644 --- a/plugins/Scriver/src/infobar.cpp +++ b/plugins/Scriver/src/infobar.cpp @@ -259,12 +259,6 @@ static INT_PTR CALLBACK InfobarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA DestroyMenu(hMenu); } break; - - case WM_DESTROY: - if (idat->m_hXStatusTip != nullptr) { - DestroyWindow(idat->m_hXStatusTip); - idat->m_hXStatusTip = nullptr; - } } return FALSE; } diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index e692c47a26..7af1819963 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -382,6 +382,11 @@ void CSrmmWindow::OnDestroy() if (m_nTypeMode == PROTOTYPE_SELFTYPING_ON) NotifyTyping(PROTOTYPE_SELFTYPING_OFF); + if (m_hXStatusTip != nullptr) { + DestroyWindow(m_hXStatusTip); + m_hXStatusTip = nullptr; + } + IcoLib_ReleaseIcon(m_hStatusIcon); m_hStatusIcon = nullptr; IcoLib_ReleaseIcon(m_hStatusIconBig); m_hStatusIconBig = nullptr; if (m_hStatusIconOverlay != nullptr) { -- cgit v1.2.3