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());