[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/applets/pager
From:       Sebastian Kügler <sebas () kde ! org>
Date:       2008-12-02 1:40:30
Message-ID: 1228182030.931175.25334.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 891434 by sebas:

Don't crash ... rather check if we're within bounds here

 M  +1 -1      pager.cpp  


--- trunk/KDE/kdebase/workspace/plasma/applets/pager/pager.cpp #891433:891434
@@ -966,7 +966,7 @@
                 currentDesktop = qMax(currentDesktop - 1, 0);
             }
 
-            if (!m_rects.isEmpty() && m_rects[currentDesktop].contains(rect)) {
+            if (m_rects.size() > currentDesktop && m_rects[currentDesktop].contains(rect)) {
                 if (m_activeWindows.contains(rect)) {
                     painter->setBrush(activeWindowBrushActiveDesk);
                     painter->setPen(activeWindowPen);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic