Add guards for OMEMO

This commit is contained in:
William Wennerström
2020-06-28 14:36:16 +02:00
parent fc6136ddf0
commit e98644f631
2 changed files with 21 additions and 5 deletions

View File

@@ -286,7 +286,9 @@ http_file_put(void *userdata)
char *url = NULL;
if (format_alt_url(upload->get_url, upload->alt_scheme, upload->alt_fragment, &url) != 0) {
char *msg;
asprintf(&msg, "Uploading '%s' failed: Bad URL ('%s')", upload->filename, upload->get_url);
if (asprintf(&msg, "Uploading '%s' failed: Bad URL ('%s')", upload->filename, upload->get_url)== -1) {
msg = strdup(FALLBACK_MSG);
}
cons_show_error(msg);
free(msg);
} else {