mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 13:48:09 +00:00
avoid crash if trying to download a Chat message without associated file
This commit is contained in:
parent
667d993e71
commit
5647e57dc1
1 changed files with 4 additions and 0 deletions
|
|
@ -1468,6 +1468,10 @@ void linphone_chat_message_download_file(LinphoneChatMessage *message) {
|
|||
const char *url=message->external_body_url;
|
||||
char* ua = ms_strdup_printf("%s/%s", linphone_core_get_user_agent_name(), linphone_core_get_user_agent_version());
|
||||
|
||||
if (url == NULL) {
|
||||
ms_error("Cannot download file from chat message [%p] because url is NULL",message);
|
||||
return;
|
||||
}
|
||||
uri=belle_generic_uri_parse(url);
|
||||
|
||||
message->http_request=belle_http_request_create("GET",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue