From fc735aba0bde2a56660c1330c4f893fab0e12646 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 2 May 2010 13:23:09 +0200 Subject: [PATCH] qv4l2: fix oops if the device has no user controls. Signed-off-by: Hans Verkuil --- utils/qv4l2/ctrl-tab.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.7.4