diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-28 10:09:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-28 13:13:58 +0000 |
commit | 7cd67196c2ef2ac8ef9f12694a7bcead119aeaa9 (patch) | |
tree | 18c1fdc86158b537db084cb07b9d9ec12855de56 | |
parent | 5fd544a713215d2b3dc7239abe0fe3b5ee8da883 (diff) |
coverity#1130422 Dereference null return value
Change-Id: I6693a9f98d2b51f255081d768672622fcd00f15d
-rw-r--r-- | sw/source/ui/dbui/mmaddressblockpage.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 2991cca7d793..85498576af7f 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -1357,7 +1357,8 @@ void AddressMultiLineEdit::InsertNewEntry( const OUString& rStr ) // select the new entry pAttrib = pTextEngine->FindCharAttrib(TextPaM(nPara, nIndex),TEXTATTR_PROTECTED); - TextSelection aEntrySel(TextPaM(nPara, nIndex), TextPaM(nPara, pAttrib->GetEnd())); + sal_uInt16 nEnd = pAttrib ? pAttrib->GetEnd() : nIndex; + TextSelection aEntrySel(TextPaM(nPara, nIndex), TextPaM(nPara, nEnd)); pTextView->SetSelection(aEntrySel); Invalidate(); Modify(); |