summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-01-21 21:51:29 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2016-01-21 22:34:23 +0200
commit9d74942d097044abbecfb9db1d515157c609289f (patch)
tree8afc56f4e6b1abc71afee3ba95a8fd8d5da95a84 /sw
parent6517141b6233c5f9667031bc92f66109fddf5b76 (diff)
Check for valid SidebarWin
Change-Id: Ia483408b5fef0880d44f37b6372054956f0ab069
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/shells/annotsh.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 9867c8a81dc1..f19da7ecab9a 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -1118,7 +1118,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
const SfxStringItem* pItem = rReq.GetArg<SfxStringItem>(nSlot);
if ( pItem )
pPostItMgr->Delete( pItem->GetValue() );
- else
+ else if ( pPostItMgr->HasActiveSidebarWin() )
pPostItMgr->Delete( pPostItMgr->GetActiveSidebarWin()->GetAuthor() );
break;
}
@@ -1132,7 +1132,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
const SfxStringItem* pItem = rReq.GetArg<SfxStringItem>(nSlot);
if ( pItem )
pPostItMgr->Hide( pItem->GetValue() );
- else
+ else if ( pPostItMgr->HasActiveSidebarWin() )
pPostItMgr->Hide( pPostItMgr->GetActiveSidebarWin()->GetAuthor() );
}
}