[BUG_FIXED] Fix crash issue : crash in the next launch after setting MS-DOS-Style as default language.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@683 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2010-10-17 18:41:59 +00:00
parent 293451089d
commit 1549b4f89f
3 changed files with 9 additions and 3 deletions

View File

@ -3949,7 +3949,12 @@ void Notepad_plus::drawTabbarColoursFromStylerArray()
TabBarPlus::setColour(stInact->_bgColor, TabBarPlus::inactiveBg);
}
void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask) {
void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
{
// To avoid to crash while MS-DOS style is set as default language,
// Checking the validity of current instance is necessary.
if (!this) return;
NppParameters *pNppParam = NppParameters::getInstance();
const NppGUI & nppGUI = pNppParam->getNppGUI();

View File

@ -185,7 +185,7 @@ BEGIN
MENUITEM "Sav&e All", IDM_FILE_SAVEALL
MENUITEM "Rename...", IDM_FILE_RENAME
MENUITEM "&Close", IDM_FILE_CLOSE
MENUITEM "Cl&ose All", IDM_FILE_CLOSEALL
MENUITEM "Clos&e All", IDM_FILE_CLOSEALL
MENUITEM "Close All but Active Document", IDM_FILE_CLOSEALL_BUT_CURRENT
MENUITEM "Delete from Disk", IDM_FILE_DELETE
MENUITEM SEPARATOR

View File

@ -1501,7 +1501,8 @@ void ScintillaEditView::activateBuffer(BufferID buffer)
return; //all done
}
void ScintillaEditView::bufferUpdated(Buffer * buffer, int mask) {
void ScintillaEditView::bufferUpdated(Buffer * buffer, int mask)
{
//actually only care about language and lexing etc
if (buffer == _currentBuffer)
{