diff options
-rw-r--r-- | src/tools/http_download.c | 2 | ||||
-rw-r--r-- | src/tools/http_upload.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/http_download.c b/src/tools/http_download.c index 57e36e61..bbbccce1 100644 --- a/src/tools/http_download.c +++ b/src/tools/http_download.c @@ -128,7 +128,7 @@ http_file_get(void* userdata) char* cert_path = prefs_get_string(PREF_TLS_CERTPATH); gchar* cafile = cafile_get_name(); ProfAccount* account = accounts_get_account(session_get_account_name()); - gboolean insecure = strcmp(account->tls_policy, "trust") == 0; + gboolean insecure = account->tls_policy && strcmp(account->tls_policy, "trust") == 0; account_free(account); pthread_mutex_unlock(&lock); diff --git a/src/tools/http_upload.c b/src/tools/http_upload.c index 5b783441..4dae41c5 100644 --- a/src/tools/http_upload.c +++ b/src/tools/http_upload.c @@ -187,7 +187,7 @@ http_file_put(void* userdata) char* cert_path = prefs_get_string(PREF_TLS_CERTPATH); gchar* cafile = cafile_get_name(); ProfAccount* account = accounts_get_account(session_get_account_name()); - gboolean insecure = strcmp(account->tls_policy, "trust") == 0; + gboolean insecure = account->tls_policy && strcmp(account->tls_policy, "trust") == 0; account_free(account); pthread_mutex_unlock(&lock); |