fixed some rare NPE caused by race for saveInstanceState()
This commit is contained in:
parent
c01bd38d00
commit
fa5ba9e02b
|
@ -595,8 +595,8 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
|
|||
}
|
||||
|
||||
private ScrollState getScrollPosition() {
|
||||
final ListView listView = this.binding.messagesView;
|
||||
if (listView.getCount() == 0 || listView.getLastVisiblePosition() == listView.getCount() - 1) {
|
||||
final ListView listView = this.binding == null ? null : this.binding.messagesView;
|
||||
if (listView == null || listView.getCount() == 0 || listView.getLastVisiblePosition() == listView.getCount() - 1) {
|
||||
return null;
|
||||
} else {
|
||||
final int pos = listView.getFirstVisiblePosition();
|
||||
|
|
Loading…
Reference in New Issue