From 8fa5e32f2315dd6fba149ff75b27759e8e3d7988 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 30 Aug 2018 15:07:31 +0200 Subject: [PATCH] Fix issue --- .../comunic/client/ui/fragments/UserPostsFragment.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/UserPostsFragment.java b/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/UserPostsFragment.java index 3af7797..55d1f3f 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/UserPostsFragment.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/UserPostsFragment.java @@ -158,7 +158,12 @@ public class UserPostsFragment extends Fragment return; //Get the list of posts of the user - mPostsList.addAll(mPostsHelper.get_user(mUserID)); + PostsList new_posts = mPostsHelper.get_user(mUserID); + + if(mPostsList == null) + return; + + mPostsList.addAll(new_posts); if(mPostsList != null) mUsersInfo = mUserHelper.getMultiple(mPostsList.getUsersId());