Skip to content

Commit

Permalink
Fix crashes found by ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phansier committed Feb 7, 2018
1 parent 02863ad commit cf31ab7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/src/main/java/com/github/mobile/api/model/Milestone.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public Milestone(org.eclipse.egit.github.core.Milestone milestone) {
this.state = milestone.getState();
this.title = milestone.getTitle();
this.description = milestone.getDescription();
this.creator = new User(milestone.getCreator());
org.eclipse.egit.github.core.User creator = milestone.getCreator();
this.creator = creator == null ? null : new User(creator);
this.open_issues = milestone.getOpenIssues();
this.closed_issues = milestone.getClosedIssues();
this.created_at = milestone.getCreatedAt();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ private void updateLabels() {
}

private void updateMilestone() {
Milestone selected = filter.getMilestone().getOldModel();
com.github.mobile.api.model.Milestone selected = filter.getMilestone();
if (selected != null)
milestoneText.setText(selected.getTitle());
milestoneText.setText(selected.getOldModel().getTitle());
else
milestoneText.setText(R.string.none);
}
Expand Down

0 comments on commit cf31ab7

Please sign in to comment.