mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
check against null in dc_backup_provider_unref() (#4232)
this is what we're doing in most comparable unref() functions.
This commit is contained in:
@@ -4230,6 +4230,10 @@ pub unsafe extern "C" fn dc_backup_provider_wait(provider: *mut dc_backup_provid
|
|||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn dc_backup_provider_unref(provider: *mut dc_backup_provider_t) {
|
pub unsafe extern "C" fn dc_backup_provider_unref(provider: *mut dc_backup_provider_t) {
|
||||||
|
if provider.is_null() {
|
||||||
|
eprintln!("ignoring careless call to dc_backup_provider_unref()");
|
||||||
|
return;
|
||||||
|
}
|
||||||
drop(Box::from_raw(provider));
|
drop(Box::from_raw(provider));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user