Hopefully fixed crash on search dialog.

Originally committed to SVN as r1861.
This commit is contained in:
Rodrigo Braz Monteiro 2008-02-15 21:47:09 +00:00
parent 8e7f84c818
commit d23733da21
1 changed files with 4 additions and 2 deletions

View File

@ -311,9 +311,11 @@ void SearchReplaceEngine::ReplaceNext(bool DoReplace) {
} }
wxArrayInt sels = grid->GetSelection(); wxArrayInt sels = grid->GetSelection();
int firstLine = 0;
if (sels.Count() > 0) firstLine = sels[0];
// if selection has changed reset values // if selection has changed reset values
if (sels[0] < curLine) { if (firstLine < curLine) {
curLine = sels[0]; curLine = firstLine;
Modified = false; Modified = false;
LastWasFind = true; LastWasFind = true;
pos = 0; pos = 0;