fixed crash

This commit is contained in:
fourtf
2018-01-19 23:41:02 +01:00
parent 03ff2205fa
commit 3104aae80a
4 changed files with 14 additions and 11 deletions
+4 -2
View File
@@ -131,6 +131,8 @@ public:
if (cachedFile.open(QIODevice::ReadOnly)) {
QByteArray bytes = cachedFile.readAll();
qDebug() << "loaded cached resource" << this->data.request.url();
onFinished(bytes);
cachedFile.close();
@@ -158,7 +160,7 @@ public:
QByteArray bytes = reply->readAll();
data.writeToCache(bytes);
// onFinished(bytes);
onFinished(bytes);
reply->deleteLater();
});
@@ -191,7 +193,7 @@ public:
if (data.caller == nullptr) {
QByteArray bytes = reply->readAll();
data.writeToCache(bytes);
// onFinished(bytes);
onFinished(bytes);
reply->deleteLater();
} else {