From 454fe8cdf7fff20d22790413747bbad7c6fa1952 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 1 Oct 2020 17:52:02 +0300 Subject: [PATCH] Fix crash in calls box. --- Telegram/SourceFiles/calls/calls_box_controller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/calls/calls_box_controller.cpp b/Telegram/SourceFiles/calls/calls_box_controller.cpp index 4d5f4400d7..1e03fa1531 100644 --- a/Telegram/SourceFiles/calls/calls_box_controller.cpp +++ b/Telegram/SourceFiles/calls/calls_box_controller.cpp @@ -274,7 +274,8 @@ void BoxController::prepare() { session().changes().messageUpdates( Data::MessageUpdate::Flag::NewAdded ) | rpl::filter([=](const Data::MessageUpdate &update) { - return (update.item->media()->call() != nullptr); + const auto media = update.item->media(); + return (media != nullptr) && (media->call() != nullptr); }) | rpl::start_with_next([=](const Data::MessageUpdate &update) { insertRow(update.item, InsertWay::Prepend); }, lifetime());