fix: rare crashes

This commit is contained in:
AlexeyZavar 2024-03-09 15:20:23 +03:00
parent bf5337259d
commit 69e9841bbb
2 changed files with 5 additions and 1 deletions

View file

@ -34,7 +34,7 @@ void lateInit() {
}
void runOnce() {
if (!Core::IsAppLaunched() || !Core::App().domain().started()) {
if (!Core::IsAppLaunched() || !Core::App().domain().started() || Core::Quitting()) {
return;
}

View file

@ -718,6 +718,10 @@ bool GroupedMedia::applyGroup(const DataMediaRange &medias) {
auto modeChosen = false;
for (const auto media : medias) {
if (!media) {
continue; // AyuGram: fix ebe44780-7c8b-4964-ba31-b747c947254f
}
const auto mediaMode = DetectMode(media);
if (!modeChosen) {
_mode = mediaMode;