diff options
author | sin <sin@2f30.org> | 2014-10-08 14:12:26 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-10-08 14:12:26 +0100 |
commit | 3d05f399c5f5e9f5f8fe87706da1a1e6dd7b95d0 (patch) | |
tree | 2e33fc8ce2e02097acfd12b5d49ceeaee5866da4 /ratox.c | |
parent | 1eed2fd18574915b60db1692aef0e20396d9065f (diff) |
Check if the call id is valid before cancelling it
Diffstat (limited to 'ratox.c')
-rw-r--r-- | ratox.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1389,7 +1389,7 @@ frienddestroy(struct friend *f) canceltxtransfer(f); cancelrxtransfer(f); - if (toxav_get_call_state(toxav, f->av.num) != av_CallNonExistant) + if (f->av.num != -1 && toxav_get_call_state(toxav, f->av.num) != av_CallNonExistant) cancelcall(f, "Destroying"); for (i = 0; i < LEN(ffiles); i++) { if (f->dirfd != -1) { |