From e6f68720e8a692e00d7dd04b2b2b9e7492da32aa Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Sat, 23 Mar 2019 16:39:52 +0400 Subject: [PATCH] Fixed crash when public profile doesn't exist --- .../io/github/chronosx88/influence/logic/StartChatLogic.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/github/chronosx88/influence/logic/StartChatLogic.java b/app/src/main/java/io/github/chronosx88/influence/logic/StartChatLogic.java index 3d5b1c0..48fb445 100644 --- a/app/src/main/java/io/github/chronosx88/influence/logic/StartChatLogic.java +++ b/app/src/main/java/io/github/chronosx88/influence/logic/StartChatLogic.java @@ -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();