From 315e38d7cd96ab041a6f3eaf5a5e8f63ca13310e Mon Sep 17 00:00:00 2001 From: donho Date: Wed, 5 Sep 2007 22:07:33 +0000 Subject: [PATCH] [BUG_FIXED] Fix the crash issue while the config.xml is corrupted. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@24 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Parameters.cpp | 12 ++++++++++-- .../src/ScitillaComponent/ScintillaEditView.h | 1 - 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index d00438ccd..84ff45aa1 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -661,8 +661,16 @@ void NppParameters::feedFileListParameters(TiXmlNode *node) childNode && (_nbFile < NB_MAX_LRF_FILE); childNode = childNode->NextSibling("File") ) { - _LRFileList[_nbFile] = new string((childNode->FirstChild())->Value()); - _nbFile++; + TiXmlNode *node = childNode->FirstChild(); + if (node) + { + const char *filePath = node->Value(); + if (filePath) + { + _LRFileList[_nbFile] = new string(filePath); + _nbFile++; + } + } } } diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h index 8a6220f51..ad2e33fba 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h @@ -529,7 +529,6 @@ public: convertSelectedTextTo(UPPERCASE); else execute(SCI_UPPERCASE); - }; void collapse(int level2Collapse, bool mode);