summaryrefslogtreecommitdiff
path: root/sw/source/ui/shells/basesh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/shells/basesh.cxx')
-rw-r--r--sw/source/ui/shells/basesh.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 0cee102729a7..0500b4a88310 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -703,8 +703,9 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.EndSelect();
}
BOOL bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK);
- if (bRet)
- rSh.ClickToField(*rSh.GetCurFld());
+ SwField* pCurField = bRet ? rSh.GetCurFld() : 0;
+ if (pCurField)
+ rSh.ClickToField(*pCurField);
rReq.SetReturnValue(SfxBoolItem( nSlot, bRet));
}
}