mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Merge pull request #7414 from zzmp/fix/leaking-reply
Delete used QNetworkReply
This commit is contained in:
commit
afa6e6e30a
2 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -1700,6 +1700,7 @@ bool Octree::readFromURL(const QString& urlString) {
|
|||
QDataStream inputStream(reply);
|
||||
readOk = readFromStream(resourceSize, inputStream);
|
||||
}
|
||||
delete reply;
|
||||
}
|
||||
return readOk;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue