mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 13:54:54 +02:00
[BUG_FIXED] Fix a crash bug while existing Notepad++ due to writing auto-insert settings.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1114 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
3a593808a5
commit
dda403cc6c
@ -4810,11 +4810,17 @@ bool NppParameters::writeGUIParams()
|
|||||||
hist_element.SetValue(TEXT("UserDefinePair"));
|
hist_element.SetValue(TEXT("UserDefinePair"));
|
||||||
|
|
||||||
// remove all old sub-nodes
|
// remove all old sub-nodes
|
||||||
|
vector<TiXmlNode *> nodes2remove;
|
||||||
for (TiXmlNode *subChildNode = childNode->FirstChildElement(TEXT("UserDefinePair"));
|
for (TiXmlNode *subChildNode = childNode->FirstChildElement(TEXT("UserDefinePair"));
|
||||||
subChildNode;
|
subChildNode;
|
||||||
subChildNode = subChildNode->NextSibling(TEXT("UserDefinePair")) )
|
subChildNode = subChildNode->NextSibling(TEXT("UserDefinePair")) )
|
||||||
{
|
{
|
||||||
childNode->RemoveChild(subChildNode);
|
nodes2remove.push_back(subChildNode);
|
||||||
|
}
|
||||||
|
size_t nbNode = nodes2remove.size();
|
||||||
|
for (size_t i = 0; i < nbNode; ++i)
|
||||||
|
{
|
||||||
|
childNode->RemoveChild(nodes2remove[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0, nb = _nppGUI._matchedPairConf._matchedPairs.size(); i < nb; ++i)
|
for (size_t i = 0, nb = _nppGUI._matchedPairConf._matchedPairs.size(); i < nb; ++i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user