summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-14 12:14:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-14 15:02:42 +0100
commit84ca5c4c619c4c6150dc278aa87c496cfb2e54d8 (patch)
tree42ca3746a55664f7aefe66efe58761ee9d2cd8a4 /sd
parent696b3dc65ba7033385cf50ec1b28e415be113002 (diff)
coverity#736804 Dereference before null check
Change-Id: If4b656ccea684fda64a3f93f5b6729c713be48b0
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fupoor.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index 06e431d9fa83..76c59e158deb 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -802,7 +802,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
// and feed character to object
if(!bReturn && !mpDocSh->IsReadOnly())
{
- if(!mpView->IsTextEdit() && mpViewShell)
+ if (!mpView->IsTextEdit())
{
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
@@ -836,11 +836,9 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
{
// test if there is a title object there. If yes, try to
// set it to edit mode and start typing...
- if( dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr
- && EditEngine::IsSimpleCharInput(rKEvt))
+ DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(mpViewShell);
+ if (pDrawViewShell && EditEngine::IsSimpleCharInput(rKEvt))
{
- DrawViewShell* pDrawViewShell =
- static_cast<DrawViewShell*>(mpViewShell);
SdPage* pActualPage = pDrawViewShell->GetActualPage();
SdrTextObj* pCandidate = 0L;