Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d29db8ea authored by Fengjiang Li's avatar Fengjiang Li
Browse files

Fix NPE where CellLayout is null when removing item out of folder

Fix: 282249989
Test: create a folder of 2 app icons, remove one icon out of folder, no crash
Change-Id: I3c132ec8833c7cb14066cc403c0641d089bab8ab
parent 05204590
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -94,6 +94,9 @@ public class LauncherDelegate {
                        // folder
                        CellLayout cellLayout = mLauncher.getCellLayout(info.container,
                                info.screenId);
                        if (cellLayout == null) {
                            return;
                        }
                        finalItem =  info.contents.remove(0);
                        newIcon = mLauncher.createShortcut(cellLayout, finalItem);
                        mLauncher.getModelWriter().addOrMoveItemInDatabase(finalItem,