From a97c07f1487a6a86cdcf01180599b77595431257 Mon Sep 17 00:00:00 2001 From: Camila Date: Mon, 20 Jun 2022 19:49:50 +0200 Subject: [PATCH] Fix segfault when _transferDataSocket is nullptr. Signed-off-by: Camila --- src/libsync/vfs/cfapi/hydrationjob.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libsync/vfs/cfapi/hydrationjob.cpp b/src/libsync/vfs/cfapi/hydrationjob.cpp index 8dae32cc44793..0de8967dd7b81 100644 --- a/src/libsync/vfs/cfapi/hydrationjob.cpp +++ b/src/libsync/vfs/cfapi/hydrationjob.cpp @@ -257,7 +257,10 @@ void OCC::HydrationJob::emitFinished(Status status) _transferDataSocket->disconnectFromServer(); return; } - _transferDataSocket->close(); + + if (_transferDataSocket) { + _transferDataSocket->close(); + } emit finished(this); }