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

Commit 8be9b08d authored by wqi's avatar wqi
Browse files

Gallery2: fix a crash caused by NullPointerException.

TimeLineSlidingWindow.get() may return null value.

add null value check.

Change-Id: Ic7c58aa5b6d2e6bd06b9d60e1884f1114411e787
CRs-Fixed: 961574
parent 41a08513
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -201,6 +201,7 @@ public class TimeLineSlotRenderer extends AbstractSlotRenderer {

        TimeLineSlidingWindow.AlbumEntry entry = mDataWindow.get(index);
        int renderRequestFlags = 0;
        if (entry != null) {
            Texture content = checkContentTexture(entry.content);
            if (content == null) {
                content = mWaitLoadingTexture;
@@ -221,7 +222,7 @@ public class TimeLineSlotRenderer extends AbstractSlotRenderer {
            }

            renderRequestFlags |= renderOverlay(canvas, index, entry, width, height);

        }
        return renderRequestFlags;
    }
}