summaryrefslogtreecommitdiff
path: root/src/gui/widgets/browserbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r--src/gui/widgets/browserbox.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 4862e07a3..fdb528cea 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -473,11 +473,9 @@ void BrowserBox::mouseExited(MouseEvent &event A_UNUSED)
void BrowserBox::draw(Graphics *graphics)
{
BLOCK_START("BrowserBox::draw")
- const ClipRect *const cr = graphics->getCurrentClipArea();
- if (!cr)
- return;
- mYStart = cr->y - cr->yOffset;
- const int yEnd = mYStart + cr->height;
+ const ClipRect &cr = graphics->getTopClip();
+ mYStart = cr.y - cr.yOffset;
+ const int yEnd = mYStart + cr.height;
if (mYStart < 0)
mYStart = 0;