Fixed crash when public profile doesn't exist

This commit is contained in:
ChronosX88 2019-03-23 16:39:52 +04:00
parent 8592cdc11a
commit e6f68720e8
Signed by: ChronosXYZ
GPG Key ID: 085A69A82C8C511A

View File

@ -76,7 +76,7 @@ public class StartChatLogic implements StartChatLogicContract {
private PublicUserProfile getPublicProfile(String peerID) {
PublicUserProfile publicProfile = null;
FutureGet futureGetProfile = peerDHT.get(Number160.createHash(peerID + "_profile")).start().awaitUninterruptibly();
if (futureGetProfile.isSuccess()) {
if (!futureGetProfile.isEmpty()) {
String jsonString = null;
try {
jsonString = (String) futureGetProfile.data().object();