aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs/basejob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/jobs/basejob.cpp')
-rw-r--r--lib/jobs/basejob.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp
index 628d10ec..8c3381ae 100644
--- a/lib/jobs/basejob.cpp
+++ b/lib/jobs/basejob.cpp
@@ -603,7 +603,7 @@ void BaseJob::setStatus(Status s)
if (d->status == s)
return;
- if (!d->connection->accessToken().isEmpty())
+ if (d->connection && !d->connection->accessToken().isEmpty())
s.message.replace(d->connection->accessToken(), "(REDACTED)");
if (!s.good())
qCWarning(d->logCat) << this << "status" << s;
@@ -618,9 +618,8 @@ void BaseJob::setStatus(int code, QString message)
void BaseJob::abandon()
{
- beforeAbandon(d->reply.data());
+ beforeAbandon(d->reply ? d->reply.data() : nullptr);
setStatus(Abandoned);
- this->disconnect();
if (d->reply)
d->reply->disconnect(this);
emit finished(this);