From d2e9cabccd6bfa439e5c9182928b273f7333cf8f Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Mon, 12 Jul 2021 22:22:31 +0900 Subject: [PATCH] Null check. Fixes austinhuang0131/barinsta#1630 --- .../fragments/directmessages/DirectMessageThreadFragment.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java b/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java index 5c74e2a8..8f91383d 100644 --- a/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java @@ -616,6 +616,7 @@ public class DirectMessageThreadFragment extends Fragment implements DirectReact } private void setObservers() { + if (viewModel == null) return; threadLiveData = viewModel.getThread(); // if (threadLiveData == null) { // final NavController navController = NavHostFragment.findNavController(this);