From 0bab63af012c9d2da217d13b7a24242710f10f62 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 28 Jun 2022 21:39:06 +0300 Subject: fixes #3077 (crash in Toaster on exit) --- plugins/Toaster/src/toast_notification.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins/Toaster/src') diff --git a/plugins/Toaster/src/toast_notification.cpp b/plugins/Toaster/src/toast_notification.cpp index 3e11ec9a51..040047ff6f 100644 --- a/plugins/Toaster/src/toast_notification.cpp +++ b/plugins/Toaster/src/toast_notification.cpp @@ -28,10 +28,15 @@ ToastNotification::ToastNotification( ToastNotification::~ToastNotification() { + if (_signature != TOAST_SIGNATURE) + return; + _signature = 0; if (_pvPopupData != nullptr) CallPopupProc(UM_FREEPLUGINDATA); - notifier->Hide(notification.Get()); + + if (notification) + notifier->Hide(notification.Get()); } HRESULT ToastNotification::CreateXml(_Outptr_ ABI::Windows::Data::Xml::Dom::IXmlDocument **xml) -- cgit v1.2.3