diff --git a/src/com/android/email/activity/MessageList.java b/src/com/android/email/activity/MessageList.java index 2ba3d7c73..c607fc64c 100644 --- a/src/com/android/email/activity/MessageList.java +++ b/src/com/android/email/activity/MessageList.java @@ -359,7 +359,10 @@ public class MessageList extends ListActivity implements OnItemClickListener, On mSavedItemPosition = getListView().getFirstVisiblePosition(); if (mSavedItemPosition >= 0) { mSavedItemTop = 0; - mSavedItemTop = getListView().getChildAt(0).getTop(); + View topChild = getListView().getChildAt(0); + if (topChild != null) { + mSavedItemTop = topChild.getTop(); + } } } }