summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-30 12:24:40 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-30 15:26:06 +0100
commitac7f1147b7d2c9ddb2b2cf12ef0ea9f45c315e8a (patch)
tree11806fc87fff8cbb2077e056e4e9735bc29b93ea
parent9ebedb7eedfeb7e622038f3c1ca35c439adcf3ae (diff)
coverity#705024 Dereference after null check
Change-Id: Ida523e52df6ec2c5e62e9a63cd1857650f84234b
-rw-r--r--sw/source/core/uibase/shells/annotsh.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/uibase/shells/annotsh.cxx b/sw/source/core/uibase/shells/annotsh.cxx
index f8524bed686f..32b0e77a6683 100644
--- a/sw/source/core/uibase/shells/annotsh.cxx
+++ b/sw/source/core/uibase/shells/annotsh.cxx
@@ -1529,7 +1529,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
{
case SID_UNDO:
{
- sal_uInt16 nCount = pUndoManager->GetUndoActionCount();
+ sal_uInt16 nCount = pUndoManager ? pUndoManager->GetUndoActionCount() : 0;
if ( nCount )
pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
else if (rSh.GetLastUndoInfo(0, 0))
@@ -1542,7 +1542,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
}
case SID_REDO:
{
- sal_uInt16 nCount = pUndoManager->GetRedoActionCount();
+ sal_uInt16 nCount = pUndoManager ? pUndoManager->GetRedoActionCount() : 0;
if ( nCount )
pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
else if (rSh.GetFirstRedoInfo(0))