am 0b95b14f: Merge "Quick patch for b/12446428." into jb-ub-now-kermit
* commit '0b95b14ffe800ac3ddccae38bfcd48ebcbc7a2a5':
Quick patch for b/12446428.
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index 95038b6..a9134e1 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -1107,7 +1107,10 @@
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);
}