fix remove chat profile img

This commit is contained in:
Simon Laux
2019-09-07 12:34:56 +02:00
committed by holger krekel
parent 275aa853f5
commit 0a8b187f80
2 changed files with 25 additions and 19 deletions

View File

@@ -898,9 +898,15 @@ pub unsafe extern "C" fn dc_set_chat_profile_image(
let context = &*context;
chat::set_chat_profile_image(context, chat_id, as_str(image))
.map(|_| 1)
.unwrap_or_log_default(context, "Failed to set profile image")
chat::set_chat_profile_image(context, chat_id, {
if image.is_null() {
""
} else {
as_str(image)
}
})
.map(|_| 1)
.unwrap_or_log_default(context, "Failed to set profile image")
}
#[no_mangle]