summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@novell.com>2010-11-16 20:14:20 +0100
committerThorsten Behrens <tbehrens@novell.com>2010-11-17 13:18:58 +0100
commitcce6be23d70e5d8911fc54dfc4c04a07097caf14 (patch)
tree4fdf06b8e789d51fd4903c8f203a4423125d03d8
parenta2f9c7dfc33f98a321abb00257f3194c737c4c12 (diff)
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)
-rw-r--r--sfx2/source/dialog/splitwin.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index b6749227d0..0521abb0a5 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
}