Merge "Check for null drawable during LayerDrawable.jumpToCurrentState()" into nyc-dev

am: 68d180b

* commit '68d180bbd1892ee5112c76be842a40a7251ed5a5':
  Check for null drawable during LayerDrawable.jumpToCurrentState()

Change-Id: Ida4daa96fdbee8b2d566ddb054f82af9120a86f3
This commit is contained in:
Alan Viverette
2016-04-25 22:27:19 +00:00
committed by android-build-merger

View File

@@ -1419,9 +1419,13 @@ public class LayerDrawable extends Drawable implements Drawable.Callback {
@Override
public void jumpToCurrentState() {
final ChildDrawable[] children = mLayerState.mChildren;
for (int i = 0, count = mLayerState.mNum; i < count; i++) {
children[i].mDrawable.jumpToCurrentState();
final ChildDrawable[] array = mLayerState.mChildren;
final int N = mLayerState.mNum;
for (int i = 0; i < N; i++) {
final Drawable dr = array[i].mDrawable;
if (dr != null) {
dr.jumpToCurrentState();
}
}
}