mirror of
https://github.com/Tha14/toxic.git
synced 2025-06-20 13:16:36 +02:00
ignore invalid file data callbacks
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user