summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-12-01 12:18:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-12-01 12:20:15 +0000
commit32c26ffb1f7585318a11f684a9886b58cea5b307 (patch)
treec703be1364293845e8dea14d665a7abfeb7d1f45 /sw
parentc8c72d903a9e2ea81cf8511cbfc292c832b04609 (diff)
Resolves: fdo#56549 crash in format->autocorrect->apply and edit changes
regression from cad9afa15f53d547733fa55f1353772f6d696611 Change-Id: I1aa36bf86969a5a90456817d360d59125948e519
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/shellres.hxx2
-rw-r--r--sw/source/ui/utlui/initui.cxx8
2 files changed, 5 insertions, 5 deletions
diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx
index af969a0dcd39..253c85de6222 100644
--- a/sw/inc/shellres.hxx
+++ b/sw/inc/shellres.hxx
@@ -87,7 +87,7 @@ struct SW_DLLPUBLIC ShellResource : public Resource
private:
void _GetAutoFmtNameLst() const;
- std::vector<String> *pAutoFmtNameLst;
+ mutable std::vector<String> *pAutoFmtNameLst;
String sPageDescFirstName;
String sPageDescFollowName;
String sPageDescName;
diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx
index be7fa016173f..768c7d6f57e9 100644
--- a/sw/source/ui/utlui/initui.cxx
+++ b/sw/source/ui/utlui/initui.cxx
@@ -229,10 +229,10 @@ struct ImpAutoFmtNameListLoader : public Resource
void ShellResource::_GetAutoFmtNameLst() const
{
- std::vector<String>* pLst(pAutoFmtNameLst);
- pLst = new std::vector<String>;
- pLst->reserve(STR_AUTOFMTREDL_END);
- ImpAutoFmtNameListLoader aTmp( *pLst );
+ assert(!pAutoFmtNameLst);
+ pAutoFmtNameLst = new std::vector<String>;
+ pAutoFmtNameLst->reserve(STR_AUTOFMTREDL_END);
+ ImpAutoFmtNameListLoader aTmp(*pAutoFmtNameLst);
}
ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( std::vector<String>& rLst )