1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-22 22:23:03 +01:00

ignore invalid file data callbacks

This commit is contained in:
Jfreegman 2014-08-12 15:27:42 -04:00
parent 5718ad52db
commit d6aaa95b25
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63

View File

@ -386,6 +386,9 @@ static void chat_onFileControl(ToxWindow *self, Tox *m, int32_t num, uint8_t rec
int i = 0; /* file_sender index */
if (receive_send == 0) {
if (!Friends.list[num].file_receiver[filenum].active)
return;
filename = Friends.list[num].file_receiver[filenum].filename;
} else {
for (i = 0; i < MAX_FILES; ++i) {
@ -393,6 +396,9 @@ static void chat_onFileControl(ToxWindow *self, Tox *m, int32_t num, uint8_t rec
break;
}
if (!file_senders[i].active)
return;
filename = file_senders[i].filename;
}