Fix segfault when receiving images as documents
This commit is contained in:
parent
82b36060b8
commit
bad92d3bd6
1 changed files with 1 additions and 4 deletions
|
@ -313,10 +313,7 @@ static void tgp_msg_display (struct tgl_state *TLS, struct tgp_msg_loading *C) {
|
|||
#endif
|
||||
}
|
||||
else if (M->media.type == tgl_message_media_photo ||
|
||||
(M->media.type == tgl_message_media_document_encr && M->media.encr_document->flags & TGLDF_IMAGE) ||
|
||||
(M->media.type == tgl_message_media_document &&
|
||||
M->media.document->flags & TGLDF_IMAGE &&
|
||||
!(M->media.document->flags & TGLDF_STICKER))) {
|
||||
(M->media.type == tgl_message_media_document_encr && M->media.encr_document->flags & TGLDF_IMAGE)) {
|
||||
char *filename = C->data;
|
||||
int img = p2tgl_imgstore_add_with_id (filename);
|
||||
if (img <= 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue