forked from qt-creator/qt-creator
Core: Don't assert on valid nullptr cases
Change-Id: I40919e9ba16c2cc8cf401fc0c9f49267a215af71 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -254,9 +254,10 @@ void HighlightScrollBarOverlay::paintEvent(QPaintEvent *paintEvent)
|
|||||||
int top = rect.top() + offset + verticalMargin + float(it.key()) / range * rect.height();
|
int top = rect.top() + offset + verticalMargin + float(it.key()) / range * rect.height();
|
||||||
const int bottom = top + resultHeight;
|
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
|
// If the previous highlight has the same category and is directly prior to this highlight
|
||||||
// we just extend the previous highlight.
|
// we just extend the previous highlight.
|
||||||
|
if (QTC_GUARD(previousRect))
|
||||||
previousRect->setBottom(bottom - 1);
|
previousRect->setBottom(bottom - 1);
|
||||||
|
|
||||||
} else { // create a new highlight
|
} else { // create a new highlight
|
||||||
|
|||||||
Reference in New Issue
Block a user