[PATCH] Keep OUString instance by using local variable to avoid cras...

Arnaud Versini (via Code Review) gerrit at gerrit.libreoffice.org
Sun Apr 28 05:40:25 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3647

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/47/3647/1

Keep OUString instance by using local variable to avoid crash.

Crash with GCC 4.8 without the modification.

Change-Id: Ieb2437f2ee6b02884aa10f2d03a4223306329cd8
---
M sw/source/core/text/itrcrsr.cxx
1 file changed, 2 insertions(+), 1 deletion(-)



diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index b68b5ce..d567e76 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -1593,7 +1593,8 @@
             else
                 nOldProp = 0;
             {
-                SwTxtSizeInfo aSizeInf( GetInfo(), rText, nCurrStart );
+                OUString rTextStr = rText;
+                SwTxtSizeInfo aSizeInf( GetInfo(), rTextStr, nCurrStart );
                 ((SwTxtCursor*)this)->SeekAndChg( aSizeInf );
                 SwTxtSlot aDiffTxt( &aSizeInf, ((SwTxtPortion*)pPor), false, false );
                 SwFontSave aSave( aSizeInf, pPor->IsDropPortion() ?

-- 
To view, visit https://gerrit.libreoffice.org/3647
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb2437f2ee6b02884aa10f2d03a4223306329cd8
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Arnaud Versini <arnaud.versini at gmail.com>



More information about the LibreOffice mailing list