diff options
author | irungentoo <irungentoo@gmail.com> | 2015-06-28 22:15:29 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2015-06-28 22:15:29 -0400 |
commit | 6aaac706fab61bbb777f025d0a2bea3800efc3de (patch) | |
tree | 23bce518cb7bd8bf43b4d9f0db65e1bd27a8ce2c /toxcore | |
parent | 50e0802a62520fe0aceff9f4e6bb6d54f1bfa0b0 (diff) |
Fixed bug.
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/net_crypto.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index be414799..60fe7021 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -700,13 +700,15 @@ static int handle_request_packet(Packets_Array *send_array, const uint8_t *data, | |||
700 | n = 0; | 700 | n = 0; |
701 | ++requested; | 701 | ++requested; |
702 | } else { | 702 | } else { |
703 | uint64_t sent_time = send_array->buffer[num]->sent_time; | 703 | if (send_array->buffer[num]) { |
704 | uint64_t sent_time = send_array->buffer[num]->sent_time; | ||
704 | 705 | ||
705 | if (l_sent_time < sent_time) | 706 | if (l_sent_time < sent_time) |
706 | l_sent_time = sent_time; | 707 | l_sent_time = sent_time; |
707 | 708 | ||
708 | free(send_array->buffer[num]); | 709 | free(send_array->buffer[num]); |
709 | send_array->buffer[num] = NULL; | 710 | send_array->buffer[num] = NULL; |
711 | } | ||
710 | } | 712 | } |
711 | 713 | ||
712 | if (n == 255) { | 714 | if (n == 255) { |