Fix NPE issue in empty MessageList (fixes #2147432)

Change-Id: Idea4e4193e95686411f8e8257d729fcfc14d50b5
This commit is contained in:
Marc Blank 2009-09-26 10:04:26 -07:00
parent c41c47fa07
commit c6a392937e

View File

@ -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();
}
}
}
}