summaryrefslogtreecommitdiff
path: root/core/java/android/view/ViewGroup.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/view/ViewGroup.java')
-rw-r--r--core/java/android/view/ViewGroup.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 5105fda80225..df07f3cbc46d 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -1152,8 +1152,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
}
mDragNotifiedChildren.clear();
- mCurrentDrag.recycle();
- mCurrentDrag = null;
+ if (mCurrentDrag != null) {
+ mCurrentDrag.recycle();
+ mCurrentDrag = null;
+ }
}
// We consider drag-ended to have been handled if one of our children