mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 11:42:15 -05:00
fixed npe when binval value of vcard avatar is null
This commit is contained in:
parent
d74e8a8a0e
commit
05f0aa614f
@ -1988,8 +1988,9 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
|
|||||||
Element vCard = packet.findChild("vCard","vcard-temp");
|
Element vCard = packet.findChild("vCard","vcard-temp");
|
||||||
Element photo = vCard != null ? vCard.findChild("PHOTO") : null;
|
Element photo = vCard != null ? vCard.findChild("PHOTO") : null;
|
||||||
Element binval = photo != null ? photo.findChild("BINVAL") : null;
|
Element binval = photo != null ? photo.findChild("BINVAL") : null;
|
||||||
if (binval != null) {
|
String image = binval != null ? binval.getContent() : null;
|
||||||
avatar.image = binval.getContent();
|
if (image != null) {
|
||||||
|
avatar.image = image;
|
||||||
if (getFileBackend().save(avatar)) {
|
if (getFileBackend().save(avatar)) {
|
||||||
Log.d(Config.LOGTAG, account.getJid().toBareJid()
|
Log.d(Config.LOGTAG, account.getJid().toBareJid()
|
||||||
+ ": successfully fetched vCard avatar for " + avatar.owner);
|
+ ": successfully fetched vCard avatar for " + avatar.owner);
|
||||||
|
Loading…
Reference in New Issue
Block a user