Fixed NPE from DocumentFileManager.isSticker. #30.

This commit is contained in:
Fabian Schlenz 2017-02-14 22:10:24 +01:00
parent 114a20a71c
commit a8325735a3
1 changed files with 1 additions and 0 deletions

View File

@ -60,6 +60,7 @@ public class DocumentFileManager extends AbstractMediaFileManager {
public boolean isSticker() {
TLDocumentAttributeSticker sticker = null;
if (this.isEmpty || doc==null) return false;
if (doc.getAttributes() != null) for(TLAbsDocumentAttribute attr : doc.getAttributes()) {
if (attr instanceof TLDocumentAttributeSticker) {
sticker = (TLDocumentAttributeSticker)attr;