aboutsummaryrefslogtreecommitdiff
path: root/lib/networkaccessmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/networkaccessmanager.cpp')
-rw-r--r--lib/networkaccessmanager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/networkaccessmanager.cpp b/lib/networkaccessmanager.cpp
index 710ade4e..f37e26b6 100644
--- a/lib/networkaccessmanager.cpp
+++ b/lib/networkaccessmanager.cpp
@@ -73,12 +73,12 @@ QNetworkReply* NetworkAccessManager::createRequest(
auto connection = AccountRegistry::instance().get(fragmentParts[0]);
if(!connection) {
qWarning() << "Connection not found";
- return nullptr;
+ return new MxcReply();
}
auto room = connection->room(fragmentParts[1]);
if(!room) {
qWarning() << "Room not found";
- return nullptr;
+ return new MxcReply();
}
QNetworkRequest r(request);
r.setUrl(QUrl(QStringLiteral("%1/_matrix/media/r0/download/%2").arg(connection->homeserver().toString(), mediaId)));
@@ -88,7 +88,7 @@ QNetworkReply* NetworkAccessManager::createRequest(
auto connection = AccountRegistry::instance().get(fragment);
if(!connection) {
qWarning() << "Connection not found";
- return nullptr;
+ return new MxcReply();
}
QNetworkRequest r(request);
r.setUrl(QUrl(QStringLiteral("%1/_matrix/media/r0/download/%2").arg(connection->homeserver().toString(), mediaId)));
@@ -96,7 +96,7 @@ QNetworkReply* NetworkAccessManager::createRequest(
return new MxcReply(reply);
} else {
qWarning() << "Invalid request";
- return nullptr;
+ return new MxcReply();
}
}
auto reply = QNetworkAccessManager::createRequest(op, request, outgoingData);