diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-09 15:28:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-09 15:28:21 +0000 |
commit | abd0ad882997dd980c483c687537971a948e81c5 (patch) | |
tree | eee19a888a71501ad76d62d5eddf2555b81e8802 /starmath | |
parent | b2f727aec7cfe94968fb4dec95eaa78b71193bff (diff) |
coverity#1169836 Dereference null return value
Change-Id: I402ceff13b2f081734151b8597c0d79ecebd6f52
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/accessibility.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index 43dc44de3ebe..2d6becb744f2 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -1364,7 +1364,10 @@ sal_Int32 SmTextForwarder::GetLineLen( sal_Int32 nPara, sal_Int32 nLine ) const void SmTextForwarder::GetLineBoundaries( /*out*/sal_Int32 &rStart, /*out*/sal_Int32 &rEnd, sal_Int32 nPara, sal_Int32 nLine ) const { EditEngine *pEditEngine = rEditAcc.GetEditEngine(); - pEditEngine->GetLineBoundaries(rStart, rEnd, nPara, nLine); + if (pEditEngine) + pEditEngine->GetLineBoundaries(rStart, rEnd, nPara, nLine); + else + rStart = rEnd = 0; } sal_Int32 SmTextForwarder::GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 nIndex ) const |