jonan / ForkHub

GitHub client for Android based on the abandoned official app
https://play.google.com/store/apps/details?id=jp.forkhub
Apache License 2.0
2.79k stars 433 forks source link

App crashes when trying to display a PR review requested not from a specific user but from code owners #384

Open michpohl opened 4 years ago

michpohl commented 4 years ago

In a Github project that is set to auto-request reviews for new pull requests from all code owners, the app crashes in EventListAdapter.java line 172 when no other reviewer was specified.

This is because in that case it tries to display a user name, but there is none. event.requested_reviewer.loginis null, so the app breaks.

This is the log (shortened for clarity):

2020-02-23 19:05:53.803 29922-29922/jp.forkhub E/AndroidRuntime: FATAL EXCEPTION: main
    Process: jp.forkhub, PID: 29922
    java.lang.NullPointerException: Attempt to read from field 'java.lang.String com.github.mobile.api.model.User.login' on a null object reference
        at com.github.mobile.ui.issue.EventListAdapter.updateEvent(EventListAdapter.java:172)
        at com.github.mobile.ui.issue.EventListAdapter.update(EventListAdapter.java:100)