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

Commit e7defc29 authored by Rajneesh Chowdury's avatar Rajneesh Chowdury
Browse files

Fix for 4080402 NPE in Transition.setDuration

Change-Id: I1e4499e3191beafdaf9bb4b7fd51798bd1eab300
parent 055a8585
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -131,6 +131,11 @@ public abstract class Transition {
        if (durationMs > getMaximumDuration()) {
            throw new IllegalArgumentException("The duration is too large");
        }
        if (afterMediaItem != null) {
            mNativeHelper = afterMediaItem.getNativeContext();
        }else {
            mNativeHelper = beforeMediaItem.getNativeContext();
        }
    }

    /**
+0 −7
Original line number Diff line number Diff line
@@ -104,13 +104,6 @@ public class TransitionAlpha extends Transition {
        mWidth = dbo.outWidth;
        mHeight = dbo.outHeight;

        if (afterMediaItem != null) {
            mNativeHelper = afterMediaItem.getNativeContext();
        }else {
            mNativeHelper = beforeMediaItem.getNativeContext();
        }


        mRGBMaskFile = String.format(mNativeHelper.getProjectPath() +
                "/" + "mask" + transitionId+ ".rgb");