summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/launcher3/Folder.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index 95038b67d..a9134e105 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -1107,7 +1107,10 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
if (getItemCount() <= 1) {
// Remove the folder
LauncherModel.deleteItemFromDatabase(mLauncher, mInfo);
- cellLayout.removeView(mFolderIcon);
+ if (cellLayout != null) {
+ // b/12446428 -- sometimes the cell layout has already gone away?
+ cellLayout.removeView(mFolderIcon);
+ }
if (mFolderIcon instanceof DropTarget) {
mDragController.removeDropTarget((DropTarget) mFolderIcon);
}