From f3603d05e7e2a8df457589f63a3c1c4d2bb2f1c4 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Thu, 14 Sep 2017 04:05:35 +0800 Subject: [PATCH] Disable processing events when adding torrents. Closes #7436. webUI connection timeout & deletion might occur while doing processEvents() and will result in use-after-free segfault. --- src/base/bittorrent/session.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 52ce82819..4081b84ce 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -2217,8 +2217,6 @@ bool Session::findIncompleteFiles(TorrentInfo &torrentInfo, QString &savePath) c found = true; torrentInfo.renameFile(i, filePath + QB_EXT); } - if ((i % 100) == 0) - qApp->processEvents(QEventLoop::ExcludeUserInputEvents); } return found;