diff --git a/src/libsync/vfs/cfapi/vfs_cfapi.cpp b/src/libsync/vfs/cfapi/vfs_cfapi.cpp index 76e3c446d..1adeb5d68 100644 --- a/src/libsync/vfs/cfapi/vfs_cfapi.cpp +++ b/src/libsync/vfs/cfapi/vfs_cfapi.cpp @@ -160,6 +160,9 @@ Result VfsCfApi::convertToPlaceholder( const auto replacesPath = QDir::toNativeSeparators(replacesFile); const auto handle = cfapi::handleForPath(localPath); + if (!handle) { + return { "Invalid handle for path " + localPath }; + } if (cfapi::findPlaceholderInfo(handle)) { return cfapi::updatePlaceholderInfo(handle, item._modtime, item._size, item._fileId, replacesPath); } else {