diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-07-23 19:24:24 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-07-23 19:24:24 -0700 |
commit | b3e4fa7851f1dfa95fe5aa4ffd9a2fd155039cca (patch) | |
tree | 0e8d14e8249361dfa173f8f0de96cfbf644e1e24 | |
parent | d1c4e003dde80b99e554e25448bd63239e30a5b2 (diff) | |
download | dsub-b3e4fa7851f1dfa95fe5aa4ffd9a2fd155039cca.tar.gz dsub-b3e4fa7851f1dfa95fe5aa4ffd9a2fd155039cca.tar.bz2 dsub-b3e4fa7851f1dfa95fe5aa4ffd9a2fd155039cca.zip |
Fix returning list with null if user returned is null
-rw-r--r-- | src/github/daneren2005/dsub/fragments/AdminFragment.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/fragments/AdminFragment.java b/src/github/daneren2005/dsub/fragments/AdminFragment.java index 08a78fd6..021e80d1 100644 --- a/src/github/daneren2005/dsub/fragments/AdminFragment.java +++ b/src/github/daneren2005/dsub/fragments/AdminFragment.java @@ -126,7 +126,10 @@ public class AdminFragment extends SelectListFragment<User> { file.delete();
List<User> users = new ArrayList<User>();
- users.add(musicService.getUser(refresh, UserUtil.getCurrentUsername(context), context, listener));
+ User user = musicService.getUser(refresh, UserUtil.getCurrentUsername(context), context, listener);
+ if(user != null) {
+ users.add(user);
+ }
UserUtil.refreshCurrentUser(context, false);
return users;
|