Fixed potential crash in Win32 notifications.

This commit is contained in:
Ales Pergl 2017-09-14 11:50:27 +02:00
parent 6bf2ec4188
commit af92a639be

View file

@ -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();
}); });