Avoids index of bound exceptions
This commit is contained in:
parent
733937c6f8
commit
0df7705a2b
|
@ -281,7 +281,7 @@ public class DisplayNotificationsFragment extends Fragment implements OnRetrieve
|
|||
return;
|
||||
if( notification != null){
|
||||
//Makes sure the notifications is not already displayed
|
||||
if( notification.getId() != null && notifications.get(0)!= null
|
||||
if( notification.getId() != null && notifications != null && notifications.size() > 0 && notifications.get(0)!= null
|
||||
&& Long.parseLong(notification.getId()) > Long.parseLong(notifications.get(0).getId())) {
|
||||
//Update the id of the last notification retrieved
|
||||
MainActivity.lastNotificationId = notification.getId();
|
||||
|
|
|
@ -291,7 +291,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
|||
//New data are available
|
||||
if (context == null)
|
||||
return;
|
||||
if( status.getId() != null && statuses.get(0)!= null
|
||||
if( status.getId() != null && statuses != null && statuses.size() > 0 && statuses.get(0)!= null
|
||||
&& Long.parseLong(status.getId()) > Long.parseLong(statuses.get(0).getId())) {
|
||||
if (type == RetrieveFeedsAsyncTask.Type.HOME) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue