be tolerant when reading unexpected NULL from the database and treat this as an empty string, compatible to core-c

This commit is contained in:
B. Petersen
2019-09-07 13:54:43 +02:00
parent d9d0dee0d5
commit 7f4ef493b9

View File

@@ -478,8 +478,7 @@ pub fn dc_msg_load_from_db<'a>(context: &'a Context, id: u32) -> Result<Message<
text = String::from_utf8_lossy(buf).into_owned();
}
} else {
warn!(context, 0, "dc_msg_load_from_db: could not get text column for id {}", id);
text = "[ Could not read from db ]".to_string();
text = "".to_string();
}
msg.text = Some(text);