aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-03 17:38:35 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit1c823b6c1d465bd894f7f37a963165ee009f35ea (patch)
treec19cd68ed6662a7f46e463497bc3d2790ad51b8d
parentda3b7bd8d9f3d3828b8cea6dff60e5f43e7ad4b1 (diff)
downloadscummvm-rg350-1c823b6c1d465bd894f7f37a963165ee009f35ea.tar.gz
scummvm-rg350-1c823b6c1d465bd894f7f37a963165ee009f35ea.tar.bz2
scummvm-rg350-1c823b6c1d465bd894f7f37a963165ee009f35ea.zip
CLOUD: Fix SavesSyncRequest
Now it would finish with error if spawned Request is nullptr.
-rw-r--r--backends/cloud/savessyncrequest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/cloud/savessyncrequest.cpp b/backends/cloud/savessyncrequest.cpp
index d5cb6f6f76..86dc83abf8 100644
--- a/backends/cloud/savessyncrequest.cpp
+++ b/backends/cloud/savessyncrequest.cpp
@@ -66,6 +66,7 @@ void SavesSyncRequest::start() {
new Common::Callback<SavesSyncRequest, Storage::ListDirectoryResponse>(this, &SavesSyncRequest::directoryListedCallback),
new Common::Callback<SavesSyncRequest, Networking::ErrorResponse>(this, &SavesSyncRequest::directoryListedErrorCallback)
);
+ if (!_workingRequest) finishError(Networking::ErrorResponse(this));
}
void SavesSyncRequest::directoryListedCallback(Storage::ListDirectoryResponse response) {
@@ -172,6 +173,7 @@ void SavesSyncRequest::directoryListedErrorCallback(Networking::ErrorResponse er
new Common::Callback<SavesSyncRequest, Storage::BoolResponse>(this, &SavesSyncRequest::directoryCreatedCallback),
new Common::Callback<SavesSyncRequest, Networking::ErrorResponse>(this, &SavesSyncRequest::directoryCreatedErrorCallback)
);
+ if (!_workingRequest) finishError(Networking::ErrorResponse(this));
}
void SavesSyncRequest::directoryCreatedCallback(Storage::BoolResponse response) {
@@ -213,6 +215,7 @@ void SavesSyncRequest::downloadNextFile() {
new Common::Callback<SavesSyncRequest, Storage::BoolResponse>(this, &SavesSyncRequest::fileDownloadedCallback),
new Common::Callback<SavesSyncRequest, Networking::ErrorResponse>(this, &SavesSyncRequest::fileDownloadedErrorCallback)
);
+ if (!_workingRequest) finishError(Networking::ErrorResponse(this));
}
void SavesSyncRequest::fileDownloadedCallback(Storage::BoolResponse response) {
@@ -256,6 +259,7 @@ void SavesSyncRequest::uploadNextFile() {
new Common::Callback<SavesSyncRequest, Storage::UploadResponse>(this, &SavesSyncRequest::fileUploadedCallback),
new Common::Callback<SavesSyncRequest, Networking::ErrorResponse>(this, &SavesSyncRequest::fileUploadedErrorCallback)
);
+ if (!_workingRequest) finishError(Networking::ErrorResponse(this));
}
void SavesSyncRequest::fileUploadedCallback(Storage::UploadResponse response) {