aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud
diff options
context:
space:
mode:
Diffstat (limited to 'backends/cloud')
-rw-r--r--backends/cloud/onedrive/onedriveuploadrequest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/backends/cloud/onedrive/onedriveuploadrequest.cpp b/backends/cloud/onedrive/onedriveuploadrequest.cpp
index 55359f83e7..5b86c6c988 100644
--- a/backends/cloud/onedrive/onedriveuploadrequest.cpp
+++ b/backends/cloud/onedrive/onedriveuploadrequest.cpp
@@ -50,9 +50,15 @@ OneDriveUploadRequest::~OneDriveUploadRequest() {
void OneDriveUploadRequest::start() {
_ignoreCallback = true;
if (_workingRequest) _workingRequest->finish();
+ if (_contentsStream == nullptr) {
+ warning("OneDriveUploadRequest: cannot restart because no stream given");
+ finishError(Networking::ErrorResponse(this, false, true, "No stream given", -1));
+ return;
+ }
if (!_contentsStream->seek(0)) {
warning("OneDriveUploadRequest: cannot restart because stream couldn't seek(0)");
finishError(Networking::ErrorResponse(this, false, true, "", -1));
+ return;
}
_ignoreCallback = false;