[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Thu Sep 12 07:44:17 PDT 2013


 sw/source/ui/dbui/mmaddressblockpage.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit e955030c0748b793fb5ff658dff713db4e621c41
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Sep 12 15:43:35 2013 +0100

    fix crash after overwriting content with tab and using move buttons
    
    Change-Id: Ica52384f05ea1e74c489b38d953e27dd37bcde89

diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 804d769..e2dc89f 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();


More information about the Libreoffice-commits mailing list