From: Hans Verkuil Date: Sun, 2 May 2010 11:23:09 +0000 (+0200) Subject: qv4l2: fix oops if the device has no user controls. X-Git-Tag: v4l-utils-0.8.0~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc735aba0bde2a56660c1330c4f893fab0e12646;p=platform%2Fupstream%2Fv4l-utils.git qv4l2: fix oops if the device has no user controls. Signed-off-by: Hans Verkuil --- diff --git a/utils/qv4l2/ctrl-tab.cpp b/utils/qv4l2/ctrl-tab.cpp index 831edc8..7503a65 100644 --- a/utils/qv4l2/ctrl-tab.cpp +++ b/utils/qv4l2/ctrl-tab.cpp @@ -102,6 +102,8 @@ void ApplicationWindow::addTabs() } for (ClassMap::iterator iter = m_classMap.begin(); iter != m_classMap.end(); ++iter) { + if (iter->second.size() == 0) + continue; ctrl_class = V4L2_CTRL_ID2CLASS(iter->second[0]); id = ctrl_class | 1; m_col = m_row = 0;