Merge pull request #7414 from zzmp/fix/leaking-reply

Delete used QNetworkReply
This commit is contained in:
Brad Hefta-Gaub 2016-03-21 16:06:45 -07:00
commit afa6e6e30a
2 changed files with 2 additions and 0 deletions

View file

@ -271,6 +271,7 @@ QNetworkReply* OBJReader::request(QUrl& url, bool isTest) {
QNetworkRequest netRequest(url);
QNetworkReply* netReply = isTest ? networkAccessManager.head(netRequest) : networkAccessManager.get(netRequest);
if (!qApp || aboutToQuit) {
netReply->deleteLater();
return nullptr;
}
QEventLoop loop; // Create an event loop that will quit when we get the finished signal

View file

@ -1700,6 +1700,7 @@ bool Octree::readFromURL(const QString& urlString) {
QDataStream inputStream(reply);
readOk = readFromStream(resourceSize, inputStream);
}
delete reply;
}
return readOk;
}