[PATCH] activation order crashes address database (fdo#41022)

julien2412 serval2412 at yahoo.fr
Mon Oct 24 02:15:20 PDT 2011


---
 toolkit/source/controls/stdtabcontroller.cxx |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx
index d5c2f06..92030f0 100644
--- a/toolkit/source/controls/stdtabcontroller.cxx
+++ b/toolkit/source/controls/stdtabcontroller.cxx
@@ -277,10 +277,12 @@ void StdTabController::autoTabOrder(  ) throw(RuntimeException)
         for ( nPos = 0; nPos < aCtrls.size(); nPos++ )
         {
             ComponentEntry* pEntry = aCtrls[ nPos ];
-            if ( pEntry->aPos.Y() >= pE->aPos.Y() )
+            if ( pEntry->aPos.Y() == pE->aPos.Y() )
             {
-                while ( pEntry && ( pEntry->aPos.Y() == pE->aPos.Y() )
-                                && ( pEntry->aPos.X() < pE->aPos.X() ) )
+                while ( nPos < aCtrls.size() &&
+                        pEntry &&
+                        ( pEntry->aPos.Y() == pE->aPos.Y() ) &&
+                        ( pEntry->aPos.X() < pE->aPos.X() ) )
                 {
                     pEntry = aCtrls[ ++nPos ];
                 }
-- 
1.7.3.4


--=-sjqQShG49JbRYD7SDKHK--



More information about the LibreOffice mailing list