[Libreoffice-commits] .: Branch 'libreoffice-3-3' - sfx2/source

Thorsten Behrens thorsten at kemper.freedesktop.org
Wed Nov 17 04:19:05 PST 2010


 sfx2/source/dialog/splitwin.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cce6be23d70e5d8911fc54dfc4c04a07097caf14
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Tue Nov 16 20:14:20 2010 +0100

    Fix crash during toolpanel re-docking
    
    The fix for i#112795 introduced a crash when re-docking the Impress
    toolpanel (in that case, the splitwin had zero dockwins, thus
    inserting the new one one-past-the end)
    (cherry picked from commit d3648ec90cc99f4c3be1e18ef636e1c0d9f6d76b)

diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index b674922..0521abb 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -650,7 +650,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
             }
         }
     }
-    if (nInsertPos == nCount && nLastWindowIdx != nCount - 1)
+    if (nCount != 0 && nInsertPos == nCount && nLastWindowIdx != nCount - 1)
     {
         nInsertPos = nLastWindowIdx + 1;    // ignore all non-windows after the last window
     }


More information about the Libreoffice-commits mailing list