mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-06 03:50:08 +02:00
error checking
This commit is contained in:
parent
8c9b8e410d
commit
cd3726eab0
2 changed files with 5 additions and 1 deletions
|
@ -3125,7 +3125,7 @@ uint32_t mrmailbox_send_msg_object(mrmailbox_t* mailbox, uint32_t chat_id, mrmsg
|
|||
{
|
||||
char* pathNfilename = NULL;
|
||||
|
||||
if( mailbox == NULL || msg == NULL ) { /* we do not check for "chat_id <= MR_CHAT_ID_LAST_SPECIAL" as special chats may be needed eg. for the setup message */
|
||||
if( mailbox == NULL || msg == NULL || chat_id <= MR_CHAT_ID_LAST_SPECIAL ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -672,6 +672,10 @@ int mrmsg_is_systemcmd(mrmsg_t* msg)
|
|||
*/
|
||||
int mrmsg_is_setupmessage(mrmsg_t* msg)
|
||||
{
|
||||
if( msg == NULL ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return mrparam_get_int(msg->m_param, MRP_SYSTEM_CMD, 0)==MR_SYSTEM_AUTOCRYPT_SETUP_MESSAGE? 1 : 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue