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

Commit 45591145 authored by Chirayu Desai's avatar Chirayu Desai Committed by Steve Kondik
Browse files

camera: VideoModule: fix NPE while trying to set HFR video parameter

* getSupportedVideoHighFrameRateModes can return null on a device
  which doesn't support it, so check if it's not null rather than
  checking if it's size is > 0.

Change-Id: Ie5be1f8a0f885ea913be5fb1eb44a97e648756d6
parent 505a85fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2099,7 +2099,7 @@ public class VideoModule implements CameraModule,

        // Enable HFR mode for WVGA
        List<String> hfrModes = mParameters.getSupportedVideoHighFrameRateModes();
        if (hfrModes.size() > 0) {
        if (hfrModes != null) {
            mParameters.setVideoHighFrameRate(mEnableHFR ? hfrModes.get(hfrModes.size() - 1) : "off");
        }