Make sure jobs don't outlive ClientSideEncryption
authorKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 20 Oct 2020 14:51:38 +0000 (16:51 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Wed, 21 Oct 2020 08:00:58 +0000 (10:00 +0200)
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
src/libsync/clientsideencryption.cpp

index a131206f2736fd9edbf178540437d9b78eda663b..340416a89bc67064b686c41cd5915a205da100f3 100644 (file)
@@ -1243,7 +1243,7 @@ void ClientSideEncryption::getPublicKeyFromServer()
 
 void ClientSideEncryption::scheduleFolderEncryptedStatusJob(const QString &path)
 {
-    auto getEncryptedStatus = new GetFolderEncryptStatusJob(_account, path);
+    auto getEncryptedStatus = new GetFolderEncryptStatusJob(_account, path, this);
     connect(getEncryptedStatus, &GetFolderEncryptStatusJob::encryptStatusReceived,
             this, &ClientSideEncryption::folderEncryptedStatusFetched);
     connect(getEncryptedStatus, &GetFolderEncryptStatusJob::encryptStatusError,