summaryrefslogtreecommitdiffstats
path: root/sfx2/source/view/viewfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/view/viewfrm.cxx')
-rw-r--r--sfx2/source/view/viewfrm.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index b14ff206fa..202064f130 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1093,8 +1093,8 @@ void SfxViewFrame::PopShellAndSubShells_Impl( SfxViewShell& i_rViewShell )
if ( nLevel )
{
// more sub shells on the stack, which were not affected by PopSubShells_Impl
- SfxShell *pSubShell = m_pDispatcher->GetShell( nLevel-1 );
- m_pDispatcher->Pop( *pSubShell, SfxDispatcherPopFlags::POP_UNTIL | SfxDispatcherPopFlags::POP_DELETE );
+ if (SfxShell *pSubShell = m_pDispatcher->GetShell( nLevel-1 ))
+ m_pDispatcher->Pop( *pSubShell, SfxDispatcherPopFlags::POP_UNTIL | SfxDispatcherPopFlags::POP_DELETE );
}
m_pDispatcher->Pop( i_rViewShell );
m_pDispatcher->Flush();