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>() {
@Override
public void onResponse(Protocol.TotalChangesByMonthResponse response) {
if (contributorsTextView != null) {
contributorsTextView.setText(String.valueOf(response.users));
}
if (editsTextView != null) {
editsTextView.setText(String.valueOf(response.changes));
if (response != null) {
if (contributorsTextView != null) {
contributorsTextView.setText(String.valueOf(response.users));
}
if (editsTextView != null) {
editsTextView.setText(String.valueOf(response.changes));
}
}
}
};