Workaround GCC segmentation fault.

This commit is contained in:
John Preston 2017-12-18 19:52:58 +04:00
parent 92333e982c
commit b1f33890d6
1 changed files with 4 additions and 4 deletions

View File

@ -322,12 +322,12 @@ void Uploader::confirm(const FullMsgId &msgId) {
void Uploader::clear() { void Uploader::clear() {
uploaded.clear(); uploaded.clear();
queue.clear(); queue.clear();
for (const auto &[requestId, requestData] : requestsSent) { for (const auto &requestData : requestsSent) {
MTP::cancel(requestId); MTP::cancel(requestData.first);
} }
requestsSent.clear(); requestsSent.clear();
for (const auto &[requestId, requestIndex] : docRequestsSent) { for (const auto &requestData : docRequestsSent) {
MTP::cancel(requestId); MTP::cancel(requestData.first);
} }
docRequestsSent.clear(); docRequestsSent.clear();
dcMap.clear(); dcMap.clear();