summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-17 08:52:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-17 08:58:57 +0100
commit7bda5f04a693c7943bc4201c11e73ca45bead661 (patch)
tree2b86071f37a963c1e09a1c46df2ca4a6f5c3994b /sw
parent4f4d8c8edbd0fc9f951c42cc1c02235b411a700f (diff)
coverity#1202822 Dereference null return value
Change-Id: I8630bfa0c4c557ab14c3b7448b6281072eebec8a
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/crstrvl.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index a7085b8d1534..ee0ac183b486 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -2256,9 +2256,12 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext )
else if( RES_DRAWFRMFMT == pFndFmt->Which() )
{
const SdrObject* pSObj = pFndFmt->FindSdrObject();
- ((SwFEShell*)this)->SelectObj( pSObj->GetCurrentBoundRect().Center() );
- MakeSelVisible();
- bRet = true;
+ if (pSObj)
+ {
+ ((SwFEShell*)this)->SelectObj( pSObj->GetCurrentBoundRect().Center() );
+ MakeSelVisible();
+ bRet = true;
+ }
}
else // then is it a fly
{