Live updates fixed NPE.

This commit is contained in:
GaidamakUA 2016-01-16 11:52:47 +02:00
parent 8074e13f70
commit e4d3286f03

View file

@ -102,11 +102,13 @@ public class ReportsFragment extends BaseOsmAndFragment {
new GetJsonAsyncTask.OnResponseListener<Protocol.TotalChangesByMonthResponse>() { new GetJsonAsyncTask.OnResponseListener<Protocol.TotalChangesByMonthResponse>() {
@Override @Override
public void onResponse(Protocol.TotalChangesByMonthResponse response) { public void onResponse(Protocol.TotalChangesByMonthResponse response) {
if (contributorsTextView != null) { if (response != null) {
contributorsTextView.setText(String.valueOf(response.users)); if (contributorsTextView != null) {
} contributorsTextView.setText(String.valueOf(response.users));
if (editsTextView != null) { }
editsTextView.setText(String.valueOf(response.changes)); if (editsTextView != null) {
editsTextView.setText(String.valueOf(response.changes));
}
} }
} }
}; };