Prevent null point exception

Test: Settings -> click search bar, not seeing null point exception
Change-Id: Ib9df9d97b374246fa36c79f531760b57d7c6c508
This commit is contained in:
Raff Tsai
2019-11-26 12:05:58 +08:00
parent 95e1c8d099
commit 0e8a45a7f5

View File

@@ -37,7 +37,7 @@ public class VideoPreferenceController extends BasePreferenceController implemen
@Override
public int getAvailabilityStatus() {
return mVideoPreference.isAnimationAvailable() ?
return mVideoPreference != null && mVideoPreference.isAnimationAvailable() ?
AVAILABLE_UNSEARCHABLE : UNSUPPORTED_ON_DEVICE;
}