2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-04 00:15:42 +00:00

Fix some possible crashes.

This commit is contained in:
John Preston
2018-06-04 22:48:17 +03:00
parent 31998406dd
commit a52392241d
4 changed files with 21 additions and 12 deletions

View File

@@ -678,7 +678,7 @@ namespace App {
auto h = App::historyLoaded(chat->id);
bool found = !h || !h->lastKeyboardFrom;
auto botStatus = -1;
for (auto i = chat->participants.begin(), e = chat->participants.end(); i != e;) {
for (auto i = chat->participants.begin(); i != chat->participants.end();) {
auto [user, version] = *i;
if (version < pversion) {
i = chat->participants.erase(i);