Merge "Add null check before detach content view from dragView at onDropComplete" into sc-dev am: 5b786ca88d am: f5555fcb8e

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15042822

Change-Id: I6101875d35cafb8664a0f8f07d5a127a2e37189c
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index a08fa1f..f412f92 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -2836,7 +2836,7 @@
             }
         } 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(