video: fixed a bug, protect getAutoGainModeList

core 1.4.3
parent 95218dd6
......@@ -591,6 +591,12 @@ bool CtVideo::checkAutoGainMode(AutoGainMode mode) const
void CtVideo::getAutoGainModeList(AutoGainModeList& modes) const
{
DEB_MEMBER_FUNCT();
if(!m_has_video)
{
modes.push_back(OFF);
return;
}
int nb_modes = 0;
if(m_video->checkAutoGainMode(HwVideoCtrlObj::OFF))
modes.push_back(OFF),++nb_modes;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment