Fix crash in calls box.
This commit is contained in:
parent
c4dfc634d0
commit
454fe8cdf7
|
@ -274,7 +274,8 @@ void BoxController::prepare() {
|
||||||
session().changes().messageUpdates(
|
session().changes().messageUpdates(
|
||||||
Data::MessageUpdate::Flag::NewAdded
|
Data::MessageUpdate::Flag::NewAdded
|
||||||
) | rpl::filter([=](const Data::MessageUpdate &update) {
|
) | 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) {
|
}) | rpl::start_with_next([=](const Data::MessageUpdate &update) {
|
||||||
insertRow(update.item, InsertWay::Prepend);
|
insertRow(update.item, InsertWay::Prepend);
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
Loading…
Reference in New Issue