summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-06-06 10:44:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-06-06 11:32:54 +0100
commit11e1744772b6645056bf15611e7123cbfcf357c7 (patch)
treec2b8719885ce90763641b76647fe87b7609baa8f /sw/source
parentf37f08c9b59a4da5ce2145909a45922937b8ada8 (diff)
coverity#705041 Dereference after null check
Change-Id: I94b1f0e6d1f8bdf7929b68682727e8b1fdde67d2
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index eefa7911978a..9da3e4c7a2ff 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -832,9 +832,12 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
case CTX_EDIT_LINK:
{
OSL_ENSURE(pCont, "edit without entry ? " );
- SfxStringItem aName(FN_EDIT_REGION,
- pCont->GetSection()->GetSectionName());
- rDispatch.Execute(FN_EDIT_REGION, SFX_CALLMODE_ASYNCHRON, &aName, 0L);
+ if (pCont)
+ {
+ SfxStringItem aName(FN_EDIT_REGION,
+ pCont->GetSection()->GetSectionName());
+ rDispatch.Execute(FN_EDIT_REGION, SFX_CALLMODE_ASYNCHRON, &aName, 0L);
+ }
}
break;
case CTX_DELETE: