diff options
-rw-r--r-- | backends/cloud/dropbox/dropboxuploadrequest.cpp | 1 | ||||
-rw-r--r-- | backends/cloud/googledrive/googledriveuploadrequest.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/backends/cloud/dropbox/dropboxuploadrequest.cpp b/backends/cloud/dropbox/dropboxuploadrequest.cpp index e530502413..a3d7dd0d6d 100644 --- a/backends/cloud/dropbox/dropboxuploadrequest.cpp +++ b/backends/cloud/dropbox/dropboxuploadrequest.cpp @@ -56,6 +56,7 @@ void DropboxUploadRequest::start() { if (!_contentsStream->seek(0)) { warning("DropboxUploadRequest: cannot restart because stream couldn't seek(0)"); finishError(Networking::ErrorResponse(this, false, true, "", -1)); + return; } _ignoreCallback = false; diff --git a/backends/cloud/googledrive/googledriveuploadrequest.cpp b/backends/cloud/googledrive/googledriveuploadrequest.cpp index ce7d59a50c..73a7fbfcac 100644 --- a/backends/cloud/googledrive/googledriveuploadrequest.cpp +++ b/backends/cloud/googledrive/googledriveuploadrequest.cpp @@ -50,9 +50,10 @@ GoogleDriveUploadRequest::~GoogleDriveUploadRequest() { void GoogleDriveUploadRequest::start() { _ignoreCallback = true; if (_workingRequest) _workingRequest->finish(); - if (!_contentsStream->seek(0)) { + if (_contentsStream == nullptr || !_contentsStream->seek(0)) { warning("GoogleDriveUploadRequest: cannot restart because stream couldn't seek(0)"); finishError(Networking::ErrorResponse(this, false, true, "", -1)); + return; } _resolvedId = ""; //used to update file contents _parentId = ""; //used to create file within parent directory |