Temporary fix for crashing during Search when there is a match on top line.

CCBUG: 205495

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1017656
This commit is contained in:
Kurt Hindenburg
2009-08-31 04:48:34 +00:00
parent 02713c707d
commit 400304077d

View File

@@ -1319,7 +1319,9 @@ void SearchHistoryTask::executeOnScreenWindow( SessionPtr session , ScreenWindow
{
int pos = -1;
const bool forwards = ( _direction == ForwardsSearch );
const int startLine = selectionLine + window->currentLine() + ( forwards ? 1 : -1 );
int startLine = selectionLine + window->currentLine() + ( forwards ? 1 : -1 );
// Temporary fix for #205495
if (startLine < 0) startLine = 0;
const int lastLine = window->lineCount() - 1;
QString string;