From 5b4eae3332cec961545eded5dbce3e791347a417 Mon Sep 17 00:00:00 2001 From: donho Date: Tue, 2 Oct 2007 00:07:09 +0000 Subject: [PATCH] [BUG_FIXED] Fix crash issue while file is deleted outside (answer NO to popup dialog to not keep) and the silence update option is on. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@49 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index d900d9a44..45926702b 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -3897,6 +3897,9 @@ void Notepad_plus::checkModifiedDocument() if (autoUpdate) { switchEditViewTo(currentView); + int indexMax = _pEditView->getNbDoc() - 1; + if (currentIndex > indexMax) + currentIndex = indexMax; _pDocTab->activate(currentIndex); } }