summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick Dubroy <dubroy@google.com>2010-07-16 22:43:04 (GMT)
committerPatrick Dubroy <dubroy@google.com>2010-07-16 22:43:04 (GMT)
commitc1701ad4b2f7e8edf03438df26e1c2161d034847 (patch)
tree750be5e00f15e28cb1358ad139a2c29839d831e4 /src
parent379f16080fc37b02e048afa0cc54c605ba0ad37e (diff)
downloadandroid_packages_apps_Trebuchet-c1701ad4b2f7e8edf03438df26e1c2161d034847.zip
android_packages_apps_Trebuchet-c1701ad4b2f7e8edf03438df26e1c2161d034847.tar.gz
android_packages_apps_Trebuchet-c1701ad4b2f7e8edf03438df26e1c2161d034847.tar.bz2
Fix null pointer when dragging outside of workspace.
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/DragController.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java
index f2fad9a..0130ba9 100644
--- a/src/com/android/launcher2/DragController.java
+++ b/src/com/android/launcher2/DragController.java
@@ -394,13 +394,14 @@ public class DragController {
// Drop on someone?
final int[] coordinates = mCoordinatesTemp;
DropTarget dropTarget = findDropTarget(screenX, screenY, coordinates);
- DropTarget delegate = dropTarget.getDropTargetDelegate(
- mDragSource, coordinates[0], coordinates[1],
- (int) mTouchOffsetX, (int) mTouchOffsetY, mDragView, mDragInfo);
- if (delegate != null) {
- dropTarget = delegate;
- }
if (dropTarget != null) {
+ DropTarget delegate = dropTarget.getDropTargetDelegate(
+ mDragSource, coordinates[0], coordinates[1],
+ (int) mTouchOffsetX, (int) mTouchOffsetY, mDragView, mDragInfo);
+ if (delegate != null) {
+ dropTarget = delegate;
+ }
+
if (mLastDropTarget == dropTarget) {
dropTarget.onDragOver(mDragSource, coordinates[0], coordinates[1],
(int) mTouchOffsetX, (int) mTouchOffsetY, mDragView, mDragInfo);