From 90fe8b8057f8abd27263bf5d82bd4078fd9eea94 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Tue, 16 Nov 2010 20:14:20 +0100 Subject: 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) --- sfx2/source/dialog/splitwin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 7c4f44118239..70985ac9273b 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 } -- cgit