summaryrefslogtreecommitdiffstats
path: root/services/java/com
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2011-01-19 12:56:26 -0800
committerChristopher Tate <ctate@google.com>2011-01-19 13:02:24 -0800
commit1fc014fd0051a48083c6d469c2a4f22da1aa15e4 (patch)
tree3cadbda3a0751a91780ef28d609b59a043d1d8c1 /services/java/com
parent4243dc394d89a93cb207efa36e9755c2424d688b (diff)
downloadframeworks_base-1fc014fd0051a48083c6d469c2a4f22da1aa15e4.zip
frameworks_base-1fc014fd0051a48083c6d469c2a4f22da1aa15e4.tar.gz
frameworks_base-1fc014fd0051a48083c6d469c2a4f22da1aa15e4.tar.bz2
Fix a couple of drag & drop crashes
1. ViewGroups being removed from the layout during a drag would wind up crashing the app with an NPE at drag-ended time, due to blind dereference of now-cleared object pointers. 2. Passing a 'null' ClipData to startDrag() would crash the system process with an NPE. Should this even be valid? I'm inclined to say yes, though it means that apps will need to guard against it. Fixes bug 3369542 Change-Id: I168fc1284d6fd4403999946609725414cf254df0
Diffstat (limited to 'services/java/com')
-rw-r--r--services/java/com/android/server/WindowManagerService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 3e930ae..bbb2228 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -583,7 +583,7 @@ public class WindowManagerService extends IWindowManager.Stub
void broadcastDragStartedLw(final float touchX, final float touchY) {
// Cache a base-class instance of the clip metadata so that parceling
// works correctly in calling out to the apps.
- mDataDescription = mData.getDescription();
+ mDataDescription = (mData != null) ? mData.getDescription() : null;
mNotifiedWindows.clear();
mDragInProgress = true;