switch (isp->sw_contex.run_mode) {
case CI_MODE_STILL_CAPTURE:
- if (isp->main_format->out_sh_fmt != SH_CSS_FRAME_FORMAT_RAW) {
+ if ((isp->main_format) &&
+ (isp->main_format->out_sh_fmt != SH_CSS_FRAME_FORMAT_RAW)) {
if (sh_css_capture_get_viewfinder_frame_info(&vf_info))
goto error;
if ((!isp->isp_subdev.video_out_vf.opened) &&
switch (isp->sw_contex.run_mode) {
case CI_MODE_STILL_CAPTURE:
- if ((isp->main_format->out_sh_fmt !=
+ if ((isp->main_format) &&
+ (isp->main_format->out_sh_fmt !=
SH_CSS_FRAME_FORMAT_RAW) &&
sh_css_capture_get_viewfinder_frame_info(&vf_info))
goto error;