Delete used QNetworkReply

This commit is contained in:
Zach Pomerantz 2016-03-21 13:30:01 -07:00
parent 091e34e792
commit 40aabe7fae
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;
}