From a48ef3f94fee4600ee29d7c409cebe2707bc65c6 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 18 Dec 2010 12:18:45 +0000 Subject: [PATCH] Make sure the tab index is correct --- src/properties/proptabbar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/properties/proptabbar.cpp b/src/properties/proptabbar.cpp index b9637754f..44b469ce3 100644 --- a/src/properties/proptabbar.cpp +++ b/src/properties/proptabbar.cpp @@ -99,6 +99,8 @@ int PropTabBar::currentIndex() const void PropTabBar::setCurrentIndex(int index) { + if(index >= m_btnGroup->buttons().size()) + index = 0; // If asked to hide or if the currently selected tab is clicked if(index < 0 || m_currentIndex == index) { if(m_currentIndex >= 0) {