mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 05:16:28 +03:00
fixup this PR with tests, and returning None from get_filemime
This commit is contained in:
@@ -2362,7 +2362,11 @@ pub unsafe extern "C" fn dc_msg_get_filemime(msg: *mut dc_msg_t) -> *mut libc::c
|
||||
return dc_strdup(ptr::null());
|
||||
}
|
||||
let ffi_msg = &*msg;
|
||||
ffi_msg.message.get_filemime().strdup()
|
||||
if let Some(x) = ffi_msg.message.get_filemime() {
|
||||
x.strdup()
|
||||
} else {
|
||||
return dc_strdup(ptr::null());
|
||||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
||||
Reference in New Issue
Block a user