Fix the NPE in the AnimationController

Add the null checking in onBindViewHolder

Fixes: 144099781
Test: compilation
Change-Id: Iafb8f758d7d71ce9fa67f4ad94d5a8a417ad674a
This commit is contained in:
Sunny Shao
2019-11-08 10:53:53 +08:00
parent 38701ed7ea
commit b808eb0464

View File

@@ -123,8 +123,10 @@ public class VideoPreference extends Preference {
layout.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT, mHeight));
}
if (mAnimationController != null) {
mAnimationController.attachView(mVideo, mPreviewImage, mPlayButton);
}
}
@Override
public void onDetached() {