Fixed potential crash in Win32 notifications.
This commit is contained in:
parent
6bf2ec4188
commit
af92a639be
1 changed files with 1 additions and 0 deletions
|
@ -325,6 +325,7 @@ HWND DesktopNotificationController::GetToast(
|
||||||
const NotificationData* data) const {
|
const NotificationData* data) const {
|
||||||
auto it = find_if(instances_.cbegin(), instances_.cend(),
|
auto it = find_if(instances_.cbegin(), instances_.cend(),
|
||||||
[data](auto&& inst) {
|
[data](auto&& inst) {
|
||||||
|
if (!inst.hwnd) return false;
|
||||||
auto toast = Toast::Get(inst.hwnd);
|
auto toast = Toast::Get(inst.hwnd);
|
||||||
return data == toast->GetNotification().get();
|
return data == toast->GetNotification().get();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue