summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-11-05 21:41:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-11-06 13:21:34 +0000
commit2e06cfc1b4e774602096f4c7241e476523283a93 (patch)
tree6e44cff8c7682312cd690a68b2aa3c4eafd71526
parentf6ca0bb117fd31a61f2eac06187c0f41ba95a768 (diff)
sd: fix STL assertion "dereference past-the-end iterator"
(regression from 967a386bccb15b99915a1e878e42450fbe9a2d0e) Change-Id: I9408170eb155f433922e5b3887059078a141d78a (cherry picked from commit 9632045906baf165076d11a97f45b153d8e2acb7)
-rw-r--r--sd/source/ui/view/ViewShellManager.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index 78b8b8b7615f..01d0e72cea46 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -877,7 +877,8 @@ void ViewShellManager::Implementation::UpdateShellStack (void)
CreateShells();
// Update the pointer to the top-most active view shell.
- mpTopViewShell = maActiveViewShells.begin()->mpShell;
+ mpTopViewShell = (maActiveViewShells.empty())
+ ? 0 : maActiveViewShells.begin()->mpShell;
// 2. Create the internal target stack.