Store dc_kml_t::locations as Option<dc_array_t> instead of pointer

This commit is contained in:
Alexander Krotov
2019-07-28 15:50:41 +03:00
parent 14e42b48bd
commit 81a84620eb
4 changed files with 38 additions and 41 deletions

View File

@@ -135,12 +135,12 @@ pub unsafe fn dc_mimeparser_empty(mimeparser: &mut dc_mimeparser_t) {
dc_e2ee_thanks(&mut (*mimeparser).e2ee_helper);
if let Some(location_kml) = (*mimeparser).location_kml.as_mut() {
dc_kml_unref(location_kml as *mut dc_kml_t);
dc_kml_unref(location_kml);
}
(*mimeparser).location_kml = None;
if let Some(message_kml) = (*mimeparser).message_kml.as_mut() {
dc_kml_unref(message_kml as *mut dc_kml_t);
dc_kml_unref(message_kml);
}
(*mimeparser).message_kml = None;
}