Fix NPE
Bug: 6259450 Change-Id: Iea92f3832fcd3a88e7d13b2e55ba4faf83be93dd
This commit is contained in:
@@ -377,7 +377,11 @@ public class DragController {
|
||||
if (rawDragInfo instanceof ShortcutInfo) {
|
||||
ShortcutInfo dragInfo = (ShortcutInfo) rawDragInfo;
|
||||
for (ApplicationInfo info : apps) {
|
||||
if (dragInfo.intent.getComponent().equals(info.intent.getComponent())) {
|
||||
// Added null checks to prevent NPE we've seen in the wild
|
||||
if (dragInfo != null &&
|
||||
dragInfo.intent != null &&
|
||||
info.intent != null &&
|
||||
dragInfo.intent.getComponent().equals(info.intent.getComponent())) {
|
||||
cancelDrag();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user