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

Commit 59f13c7d authored by Romain Guy's avatar Romain Guy
Browse files

Prevent NPE in TextView.getFadeTop()

Bug #5051776

Change-Id: I2fc1ac4b31c06cfb224898ff39f6b63bfbcd77e8
parent 62ea5e80
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -5068,6 +5068,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
     */
    @Override
    protected int getFadeTop(boolean offsetRequired) {
        if (mLayout == null) return 0;

        int voffset = 0;
        if ((mGravity & Gravity.VERTICAL_GRAVITY_MASK) != Gravity.TOP) {
            voffset = getVerticalOffset(true);