diff options
Diffstat (limited to 'src/plugins/coreplugin/find')
-rw-r--r-- | src/plugins/coreplugin/find/highlightscrollbar.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/find/highlightscrollbar.cpp b/src/plugins/coreplugin/find/highlightscrollbar.cpp index c7cc690fa9..5c25984758 100644 --- a/src/plugins/coreplugin/find/highlightscrollbar.cpp +++ b/src/plugins/coreplugin/find/highlightscrollbar.cpp @@ -254,10 +254,11 @@ void HighlightScrollBarOverlay::paintEvent(QPaintEvent *paintEvent) int top = rect.top() + offset + verticalMargin + float(it.key()) / range * rect.height(); const int bottom = top + resultHeight; - if (QTC_GUARD(previousRect) && previousCategory == currentCategory && previousBottom + 1 >= top) { + if (previousCategory == currentCategory && previousBottom + 1 >= top) { // If the previous highlight has the same category and is directly prior to this highlight // we just extend the previous highlight. - previousRect->setBottom(bottom - 1); + if (QTC_GUARD(previousRect)) + previousRect->setBottom(bottom - 1); } else { // create a new highlight if (previousRect && previousBottom >= top) { |