From aaa4db7b27a1caac7d993aa940e10a898da99165 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 30 May 2020 22:20:19 +0400 Subject: [PATCH] Fix a crash in custom notifications. --- Telegram/SourceFiles/window/notifications_manager_default.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/window/notifications_manager_default.cpp b/Telegram/SourceFiles/window/notifications_manager_default.cpp index 51303a908..5d19b9195 100644 --- a/Telegram/SourceFiles/window/notifications_manager_default.cpp +++ b/Telegram/SourceFiles/window/notifications_manager_default.cpp @@ -551,7 +551,7 @@ Notification::Notification( auto position = computePosition(st::notifyMinHeight); updateGeometry(position.x(), position.y(), st::notifyWidth, st::notifyMinHeight); - _userpicLoaded = (_userpicView->image() != nullptr); + _userpicLoaded = !_userpicView || (_userpicView->image() != nullptr); updateNotifyDisplay(); _hideTimer.setSingleShot(true);