[BUG_FIXED] Fix crash issue on quit Notepad++ while session snapshot period backup feature is on.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1286 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2014-11-11 13:20:38 +00:00
parent f043be8d25
commit ee67ab951f
2 changed files with 11 additions and 2 deletions

View File

@ -5835,13 +5835,21 @@ DWORD WINAPI Notepad_plus::backupDocument(void * /*param*/)
bool isSnapshotMode = true;
while (isSnapshotMode)
{
size_t timer = NppParameters::getInstance()->getNppGUI()._snapshotBackupTiming;
NppParameters *nppParam = NppParameters::getInstance();
if (!nppParam)
return FALSE;
size_t timer = nppParam->getNppGUI()._snapshotBackupTiming;
if (timer < 1000)
timer = 1000;
::Sleep(timer);
isSnapshotMode = NppParameters::getInstance()->getNppGUI().isSnapshotMode();
nppParam = NppParameters::getInstance();
if (!nppParam)
return FALSE;
isSnapshotMode = nppParam->getNppGUI().isSnapshotMode();
if (!isSnapshotMode)
break;

View File

@ -1562,6 +1562,7 @@ void NppParameters::destroyInstance()
delete _pXmlBlacklistDoc;
delete _pSelf;
_pSelf = NULL;
}
void NppParameters::setFontList(HWND hWnd)