diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 303bb01df0..f28f54a024 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -2792,7 +2792,7 @@ public class Workspace extends PagedView } } else if (mDragInfo != null) { // When drag is cancelled, reattach content view back to its original parent. - if (mDragInfo.cell instanceof LauncherAppWidgetHostView) { + if (mDragInfo.cell instanceof LauncherAppWidgetHostView && d.dragView != null) { d.dragView.detachContentView(/* reattachToPreviousParent= */ true); } final CellLayout cellLayout = mLauncher.getCellLayout(