Fix crash when going to history/chat/contacts on tablet
This commit is contained in:
parent
7ae0da9f54
commit
1fde4ac80a
3 changed files with 3 additions and 3 deletions
|
@ -185,7 +185,7 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
}
|
||||
|
||||
public void displayFirstChat(){
|
||||
if(mConversations.size() > 0) {
|
||||
if (mConversations != null && mConversations.size() > 0) {
|
||||
LinphoneActivity.instance().displayChat(mConversations.get(0));
|
||||
} else {
|
||||
LinphoneActivity.instance().displayEmptyFragment();
|
||||
|
|
|
@ -295,7 +295,7 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
|
|||
}
|
||||
|
||||
public void displayFirstContact(){
|
||||
if(contactsList.getAdapter() != null && contactsList.getAdapter().getCount() > 0) {
|
||||
if (contactsList != null && contactsList.getAdapter() != null && contactsList.getAdapter().getCount() > 0) {
|
||||
LinphoneActivity.instance().displayContact((LinphoneContact) contactsList.getAdapter().getItem(0), false);
|
||||
} else {
|
||||
LinphoneActivity.instance().displayEmptyFragment();
|
||||
|
|
|
@ -120,7 +120,7 @@ public class HistoryListFragment extends Fragment implements OnClickListener, On
|
|||
}
|
||||
|
||||
public void displayFirstLog(){
|
||||
if(mLogs.size() > 0){
|
||||
if (mLogs != null && mLogs.size() > 0) {
|
||||
LinphoneCallLog log = mLogs.get(0);
|
||||
if (log.getDirection() == CallDirection.Incoming) {
|
||||
LinphoneActivity.instance().displayHistoryDetail(mLogs.get(0).getFrom().toString(), mLogs.get(0));
|
||||
|
|
Loading…
Reference in a new issue