summaryrefslogtreecommitdiff
path: root/protocols/CloudFile/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/CloudFile/src')
-rw-r--r--protocols/CloudFile/src/Services/yandex_service.cpp9
-rw-r--r--protocols/CloudFile/src/http_request.h2
2 files changed, 4 insertions, 7 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;
diff --git a/protocols/CloudFile/src/http_request.h b/protocols/CloudFile/src/http_request.h
index c9921cfd76..bcda0e1c3e 100644
--- a/protocols/CloudFile/src/http_request.h
+++ b/protocols/CloudFile/src/http_request.h
@@ -20,8 +20,6 @@ public:
class HttpRequest : public MHttpRequest
{
private:
- CMStringA m_szUrl;
-
void Init()
{
flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMP;