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

Commit 2c1d7f41 authored by chihhangchuang's avatar chihhangchuang
Browse files

Fix runtime crash of using null wallpaperConnection instance

Test: Manually
Fixes: 157623239
Change-Id: Idb542b7febbab537e5adf9a01aeaa0272404688d
parent c4d30d64
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ public class WallpaperPreviewer implements LifecycleObserver {

        mWallpaperConnection.setVisibility(true);
        mHomePreview.post(() -> {
            if (!mWallpaperConnection.connect()) {
            if (mWallpaperConnection != null && !mWallpaperConnection.connect()) {
                mWallpaperConnection = null;
                LiveTileOverlay.INSTANCE.detach(mHomePreview.getOverlay());
            }