summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-12 15:43:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-12 15:43:56 +0100
commite955030c0748b793fb5ff658dff713db4e621c41 (patch)
tree064384ada3da72a023b8256dab70fdba7321bf29 /sw
parentbc1fced1aedbaca367fc653c5806f1f8d9efeebe (diff)
fix crash after overwriting content with tab and using move buttons
Change-Id: Ica52384f05ea1e74c489b38d953e27dd37bcde89
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 804d76965fdf..e2dc89fff863 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -1581,9 +1581,9 @@ void AddressMultiLineEdit::MoveCurrentItem(sal_uInt16 nMove)
InsertNewEntryAtPosition( sCurrentItem, nPara, nIndex );
// select the new entry [#i40817]
- const TextCharAttrib *pAttrib;
- pAttrib = pTextEngine->FindCharAttrib(TextPaM(nPara, nIndex),TEXTATTR_PROTECTED);
- aEntrySel = TextSelection(TextPaM(nPara, nIndex), TextPaM(nPara, pAttrib->GetEnd()));
+ const TextCharAttrib *pAttrib = pTextEngine->FindCharAttrib(TextPaM(nPara, nIndex),TEXTATTR_PROTECTED);
+ if (pAttrib)
+ aEntrySel = TextSelection(TextPaM(nPara, nIndex), TextPaM(nPara, pAttrib->GetEnd()));
pTextView->SetSelection(aEntrySel);
Invalidate();
Modify();