From b4d5812942fdb2ca89c9f048e539c4c65a8994cf Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Mon, 11 Feb 2019 23:44:35 +0200 Subject: [PATCH] fix crash when profile has no value yet seems to happen when the app is restarted after a crash skipping the check seems fine, maybe because a following setting of Data.profile triggers it again --- .../java/net/ktnx/mobileledger/ui/activity/MainActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index 02eb8096..641d296c 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -395,6 +395,6 @@ public class MainActivity extends CrashReportingActivity { } public void fabShouldShow() { MobileLedgerProfile profile = Data.profile.get(); - if (profile.isPostingPermitted()) fab.show(); + if ((profile != null) && profile.isPostingPermitted()) fab.show(); } } -- 2.39.2