Fix segfault
This commit is contained in:
parent
747c214dcd
commit
e14b681d6e
1 changed files with 6 additions and 2 deletions
|
@ -443,8 +443,12 @@ void tgp_msg_recv (struct tgl_state *TLS, struct tgl_message *M) {
|
|||
return;
|
||||
}
|
||||
if (M->media.type == tgl_message_media_photo) {
|
||||
C->done = FALSE;
|
||||
tgl_do_load_photo (TLS, M->media.photo, tgp_msg_on_loaded_document, C);
|
||||
|
||||
// there are messages with type media_photo, but without a photo element, buy why?
|
||||
if (M->media.photo) {
|
||||
C->done = FALSE;
|
||||
tgl_do_load_photo (TLS, M->media.photo, tgp_msg_on_loaded_document, C);
|
||||
}
|
||||
}
|
||||
if (M->media.type == tgl_message_media_document_encr &&
|
||||
M->media.encr_document->flags & TGLDF_IMAGE &&
|
||||
|
|
Loading…
Add table
Reference in a new issue