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,6 +102,7 @@ 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 (response != null) {
if (contributorsTextView != null) { if (contributorsTextView != null) {
contributorsTextView.setText(String.valueOf(response.users)); contributorsTextView.setText(String.valueOf(response.users));
} }
@ -109,6 +110,7 @@ public class ReportsFragment extends BaseOsmAndFragment {
editsTextView.setText(String.valueOf(response.changes)); editsTextView.setText(String.valueOf(response.changes));
} }
} }
}
}; };
requestData(monthUrlString, regionUrlString, onResponseListener); requestData(monthUrlString, regionUrlString, onResponseListener);
} }