I've implemented SharedElementTransition in my app. Animation opens from recyclerView item to a ViewPager of next activity. If user changes pages on next screen then based upon final position i change the scrollPosition in recyclerView too using 'reenter' method of activity. It is working fine mostly but sometimes when i start animation and then minimize the app then it through following exception and doesn't even point out the line so i'm unable to handle this exception.
NullPointerException: Attempt to invoke virtual method 'void android.view.ViewGroup.transformMatrixToLocal(android.graphics.Matrix)' on a null object reference