summaryrefslogtreecommitdiff
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.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 68ea4a3f8933..f20d4932494a 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -954,6 +954,9 @@ void SfxViewFrame::ExecHistory_Impl( SfxRequest &rReq )
{
// Is there an Undo-Manager on the top Shell?
SfxShell *pSh = GetDispatcher()->GetShell(0);
+ if (!pSh)
+ return;
+
SfxUndoManager* pShUndoMgr = pSh->GetUndoManager();
bool bOK = false;
if ( pShUndoMgr )