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

@@ -771,7 +771,7 @@ pub unsafe fn dc_receive_imf(
context,
chat_id,
from_id,
mime_parser.message_kml.unwrap().locations,
&mime_parser.message_kml.unwrap().locations,
1,
);
if 0 != newest_location_id && 0 == hidden {
@@ -797,7 +797,7 @@ pub unsafe fn dc_receive_imf(
context,
chat_id,
from_id,
mime_parser.location_kml.as_ref().unwrap().locations,
&mime_parser.location_kml.as_ref().unwrap().locations,
0,
);
if newest_location_id != 0 && hidden == 0 && !location_id_written {