diff options
author | Jay Shrauner <shrauner@google.com> | 2014-12-01 19:59:54 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-01 19:59:54 +0000 |
commit | a86db52a75776d2c160814bb02f588ab128d96a4 (patch) | |
tree | 29a75747262f51fde0f484aa7cc5209a54ee0758 | |
parent | 70efd9c17b7726fbfde6a9641da7e9030cb08988 (diff) | |
parent | eaf7d3bdf1d7b94f3181dfe72ac701d7887c17ad (diff) |
am eaf7d3bd: am 4ad916ec: am ce5effba: Merge "Fix NPE in markDropArea" into lmp-mr1-dev
* commit 'eaf7d3bdf1d7b94f3181dfe72ac701d7887c17ad':
Fix NPE in markDropArea
-rw-r--r-- | src/com/android/dialer/list/PhoneFavoritesTileAdapter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java index 382e42e56..3f670127f 100644 --- a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java +++ b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java @@ -441,7 +441,8 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements * @param itemIndex Position of the contact in {@link #mContactEntries}. */ private void markDropArea(int itemIndex) { - if (isIndexInBound(mDragEnteredEntryIndex) && isIndexInBound(itemIndex)) { + if (mDraggedEntry != null && isIndexInBound(mDragEnteredEntryIndex) && + isIndexInBound(itemIndex)) { mDataSetChangedListener.cacheOffsetsForDatasetChange(); // Remove the old placeholder item and place the new placeholder item. final int oldIndex = mDragEnteredEntryIndex; |