From 400304077d0976f6f34ea227305a51c8a7caa4fb Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Mon, 31 Aug 2009 04:48:34 +0000 Subject: [PATCH] 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 --- src/SessionController.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SessionController.cpp b/src/SessionController.cpp index 86e53c0a7..a70500bdc 100644 --- a/src/SessionController.cpp +++ b/src/SessionController.cpp @@ -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;