fix: crashes

This commit is contained in:
AlexeyZavar 2024-11-20 16:07:27 +03:00
parent 4e0ffc1e28
commit 7631722e99
2 changed files with 14 additions and 12 deletions

View file

@ -51,6 +51,7 @@ void runOnce() {
const auto invalidateAll = cOtherOnline() >= t;
for (const auto &[index, account] : Core::App().domain().accounts()) {
if (account) {
if (const auto session = account->maybeSession()) {
const auto id = session->userId().bare;
if (!state.contains(id)) {
@ -68,6 +69,7 @@ void runOnce() {
}
}
}
}
[[noreturn]] void loop() {
while (true) {

View file

@ -411,7 +411,7 @@ bool AddForwardMessageAction(
const ContextMenuRequest &request,
not_null<ListWidget*> list) {
const auto item = request.item;
if (item->isDeleted()) {
if (item && item->isDeleted()) {
return false;
}