From e4e813fe16739bab9a0fea395aa53d7916a4d471 Mon Sep 17 00:00:00 2001 From: apacadabra Date: Sun, 13 May 2018 22:15:28 +0200 Subject: [PATCH] Pajlada told me this would fix the crash when you change user --- src/util/networkrequest.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/networkrequest.hpp b/src/util/networkrequest.hpp index f1de1066d..07da68f4a 100644 --- a/src/util/networkrequest.hpp +++ b/src/util/networkrequest.hpp @@ -372,7 +372,9 @@ private: QObject::connect(worker, &NetworkWorker::doneUrl, this->data.caller, [data = this->data](auto reply) mutable { if (reply->error() != QNetworkReply::NetworkError::NoError) { - data.onError(reply->error()); + if (data.onError) { + data.onError(reply->error()); + } return; }