qv4l2: fix oops if the device has no user controls.
authorHans Verkuil <hverkuil@xs4all.nl>
Sun, 2 May 2010 11:23:09 +0000 (13:23 +0200)
committerHans Verkuil <hverkuil@xs4all.nl>
Sun, 2 May 2010 11:23:09 +0000 (13:23 +0200)
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
utils/qv4l2/ctrl-tab.cpp

index 831edc8..7503a65 100644 (file)
@@ -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;