mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Merge pull request #1882 from profanity-im/fix/1880-pluginsinstall
Don't crash when using `/plugins install` disconnected
This commit is contained in:
commit
8618203988
@ -134,7 +134,10 @@ http_file_get(void* userdata)
|
||||
gchar* cert_path = prefs_get_string(PREF_TLS_CERTPATH);
|
||||
gchar* cafile = cafile_get_name();
|
||||
ProfAccount* account = accounts_get_account(session_get_account_name());
|
||||
gboolean insecure = account->tls_policy && strcmp(account->tls_policy, "trust") == 0;
|
||||
gboolean insecure = FALSE;
|
||||
if (account) {
|
||||
insecure = account->tls_policy && strcmp(account->tls_policy, "trust") == 0;
|
||||
}
|
||||
account_free(account);
|
||||
pthread_mutex_unlock(&lock);
|
||||
|
||||
|
@ -186,8 +186,11 @@ http_file_put(void* userdata)
|
||||
|
||||
auto_gchar gchar* cert_path = prefs_get_string(PREF_TLS_CERTPATH);
|
||||
gchar* cafile = cafile_get_name();
|
||||
gboolean insecure = FALSE;
|
||||
ProfAccount* account = accounts_get_account(session_get_account_name());
|
||||
gboolean insecure = account->tls_policy && strcmp(account->tls_policy, "trust") == 0;
|
||||
if (account) {
|
||||
insecure = account->tls_policy && strcmp(account->tls_policy, "trust") == 0;
|
||||
}
|
||||
account_free(account);
|
||||
pthread_mutex_unlock(&lock);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user