Fix potential null pointer access
authorHannah von Reth <hannah.vonreth@owncloud.com>
Fri, 27 Nov 2020 09:03:54 +0000 (10:03 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:59:07 +0000 (10:59 +0100)
https://sentry.io/organizations/owncloud/issues/1529161263/events/02509984b5ca42ffb3960d9c9e161414/?project=79001&statsPeriod=14d

src/libsync/discoveryphase.h

index c0e648ba6a2e4a273ffeecaf43fcb7ba867f5ab5..5c6eabd2dfba0ffafd0837c99e02311ddddd73a7 100644 (file)
@@ -157,7 +157,7 @@ class DiscoveryPhase : public QObject
 
     friend class ProcessDirectoryJob;
 
-    ProcessDirectoryJob *_currentRootJob = nullptr;
+    QPointer<ProcessDirectoryJob> _currentRootJob;
 
     /** Maps the db-path of a deleted item to its SyncFileItem.
      *