From ea857110bfd52c7554305cbd634e92ea2f8dfaad Mon Sep 17 00:00:00 2001 From: jubb Date: Wed, 24 Feb 2021 16:32:01 +1100 Subject: [PATCH] fix: orEmpty on profilePicture to prevent NPE --- .../messaging/messages/control/ConfigurationMessage.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/control/ConfigurationMessage.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/control/ConfigurationMessage.kt index 6a03f48e5d..4ded41b436 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/control/ConfigurationMessage.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/control/ConfigurationMessage.kt @@ -102,7 +102,7 @@ class ConfigurationMessage(val closedGroups: List, val openGroups: configurationProto.addAllClosedGroups(closedGroups.mapNotNull { it.toProto() }) configurationProto.addAllOpenGroups(openGroups) configurationProto.displayName = displayName - configurationProto.profilePicture = profilePicture + configurationProto.profilePicture = profilePicture.orEmpty() configurationProto.profileKey = ByteString.copyFrom(profileKey) val contentProto = SignalServiceProtos.Content.newBuilder() contentProto.configurationMessage = configurationProto.build()