mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 06:03:04 +01:00
ignore invalid file data callbacks
This commit is contained in:
parent
5718ad52db
commit
d6aaa95b25
@ -386,6 +386,9 @@ static void chat_onFileControl(ToxWindow *self, Tox *m, int32_t num, uint8_t rec
|
|||||||
int i = 0; /* file_sender index */
|
int i = 0; /* file_sender index */
|
||||||
|
|
||||||
if (receive_send == 0) {
|
if (receive_send == 0) {
|
||||||
|
if (!Friends.list[num].file_receiver[filenum].active)
|
||||||
|
return;
|
||||||
|
|
||||||
filename = Friends.list[num].file_receiver[filenum].filename;
|
filename = Friends.list[num].file_receiver[filenum].filename;
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < MAX_FILES; ++i) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!file_senders[i].active)
|
||||||
|
return;
|
||||||
|
|
||||||
filename = file_senders[i].filename;
|
filename = file_senders[i].filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user