mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Allow NULL as argument to tox_kill.
This behaviour is consistent with free() and operator delete.
This commit is contained in:
parent
a5e35180c7
commit
390fcb6c27
|
@ -240,6 +240,10 @@ Tox *tox_new(const struct Tox_Options *options, TOX_ERR_NEW *error)
|
|||
|
||||
void tox_kill(Tox *tox)
|
||||
{
|
||||
if (tox == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
Messenger *m = tox;
|
||||
kill_groupchats(m->group_chat_object);
|
||||
kill_messenger(m);
|
||||
|
|
Loading…
Reference in New Issue
Block a user