diff --git a/src/dc_msg.rs b/src/dc_msg.rs index f4d19ef27..6f0490dcf 100644 --- a/src/dc_msg.rs +++ b/src/dc_msg.rs @@ -786,7 +786,7 @@ pub unsafe fn dc_msg_get_summary<'a>( msg: *mut dc_msg_t<'a>, mut chat: *const Chat<'a>, ) -> *mut dc_lot_t { - let current_block: u64; + let mut ok_to_continue = true; let ret: *mut dc_lot_t = dc_lot_new(); let mut chat_to_delete: *mut Chat = 0 as *mut Chat; @@ -794,17 +794,12 @@ pub unsafe fn dc_msg_get_summary<'a>( if chat.is_null() { chat_to_delete = dc_get_chat((*msg).context, (*msg).chat_id); if chat_to_delete.is_null() { - current_block = 15204159476013091401; + ok_to_continue = false; } else { chat = chat_to_delete; - current_block = 7815301370352969686; } - } else { - current_block = 7815301370352969686; } - match current_block { - 15204159476013091401 => {} - _ => { + if ok_to_continue { let contact = if (*msg).from_id != DC_CONTACT_ID_SELF as libc::c_uint && ((*chat).type_0 == 120 || (*chat).type_0 == 130) { @@ -814,7 +809,6 @@ pub unsafe fn dc_msg_get_summary<'a>( }; dc_lot_fill(ret, msg, chat, contact.as_ref(), (*msg).context); - } } }