summaryrefslogtreecommitdiff
path: root/protocols/CloudFile/src/Services
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-04-07 20:18:35 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-04-07 20:18:39 +0300
commit87e7faeba43caf78eb9f5b08350e1fd07268d7cd (patch)
treef17940f599553ea675db1b730d43de6bac9168bf /protocols/CloudFile/src/Services
parentcd6fcef67cdf3c72afc98ed149f82af7f6860487 (diff)
fixes #4335 (Cloudfile Upload not working)
Diffstat (limited to 'protocols/CloudFile/src/Services')
-rw-r--r--protocols/CloudFile/src/Services/yandex_service.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/protocols/CloudFile/src/Services/yandex_service.cpp b/protocols/CloudFile/src/Services/yandex_service.cpp
index 892821e0c4..e252eed161 100644
--- a/protocols/CloudFile/src/Services/yandex_service.cpp
+++ b/protocols/CloudFile/src/Services/yandex_service.cpp
@@ -102,11 +102,10 @@ void CYandexService::RequestAccessTokenThread(void *param)
NLHR_PTR response(request.Send(m_hConnection));
if (response == nullptr || response->resultCode != HTTP_CODE_OK) {
- const char *error = response->body.GetLength()
- ? response->body
- : HttpStatusToError(response->resultCode);
-
- Netlib_Logf(m_hConnection, "%s: %s", GetAccountName(), error);
+ if (response) {
+ const char *error = response->body.GetLength() ? response->body : HttpStatusToError(response->resultCode);
+ Netlib_Logf(m_hConnection, "%s: %s", GetAccountName(), error);
+ }
ShowNotification(TranslateT("Server does not respond"), MB_ICONERROR);
EndDialog(hwndDlg, 0);
return;