From 14aa45516412a70c9a7b487872b5c0a96936cd49 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 6 Mar 2020 13:49:39 +0400 Subject: [PATCH] Fix freeze in complex file location saving. Fixes #6986. --- Telegram/SourceFiles/storage/localstorage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/storage/localstorage.cpp b/Telegram/SourceFiles/storage/localstorage.cpp index cac8a7bb3..16dc9627e 100644 --- a/Telegram/SourceFiles/storage/localstorage.cpp +++ b/Telegram/SourceFiles/storage/localstorage.cpp @@ -3158,7 +3158,7 @@ void writeFileLocation(MediaKey location, const FileLocation &local) { return; } if (i.value().first != location) { - for (FileLocations::iterator j = _fileLocations.find(i.value().first), e = _fileLocations.end(); (j != e) && (j.key() == i.value().first);) { + for (FileLocations::iterator j = _fileLocations.find(i.value().first), e = _fileLocations.end(); (j != e) && (j.key() == i.value().first); ++j) { if (j.value() == i.value().second) { _fileLocations.erase(j); break;