From 11e1744772b6645056bf15611e7123cbfcf357c7 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 6 Jun 2014 10:44:54 +0100 Subject: coverity#705041 Dereference after null check Change-Id: I94b1f0e6d1f8bdf7929b68682727e8b1fdde67d2 --- sw/source/uibase/utlui/glbltree.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sw/source') 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: -- cgit