Fix two crashes

This commit is contained in:
Phillip Thelen 2016-04-15 01:48:59 +02:00
parent 6ffe50d5a5
commit 05231ca96b
2 changed files with 9 additions and 4 deletions

View file

@ -80,9 +80,11 @@ public class TaskScoringCallback implements Callback<TaskDirectionData> {
.querySingle(new TransactionListener() {
@Override
public void onResultReceived(Object result) {
Item item = (Item)result;
item.setOwned(item.getOwned()+1);
item.save();
if (result != null) {
Item item = (Item)result;
item.setOwned(item.getOwned()+1);
item.save();
}
}
@Override

View file

@ -145,7 +145,10 @@ public class GroupInformationFragment extends Fragment {
viewBinding.setHideParticipantCard(true);
return;
}
assert context != null;
if (group.quest.members == null) {
viewBinding.setHideParticipantCard(true);
return;
}
LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
for (HabitRPGUser member : group.members) {
final LinearLayout itemView = (LinearLayout) layoutInflater.inflate(R.layout.party_member_quest, questMemberView, false);