summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-05-03 22:57:37 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-05-03 22:57:37 +0300
commit8f90d307468f43f117cb5ca826187105ca5e1279 (patch)
tree07284a97f1da870c22d79cf6092b5570b0919a52 /plugins/Scriver
parente36fec231359220bf3af8bb8c1957078dd046f4e (diff)
Scriver: fix for memory corruption
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/infobar.cpp6
-rw-r--r--plugins/Scriver/src/msgdialog.cpp5
2 files changed, 5 insertions, 6 deletions
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) {