summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/widgets/browserbox.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 81f54212..735c1833 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -280,7 +280,7 @@ void BrowserBox::draw(gcn::Graphics *graphics)
graphics->fillRectangle(gcn::Rectangle(0, 0, getWidth(), getHeight()));
}
- if (mSelectedLink >= 0)
+ if (mSelectedLink >= 0 && mSelectedLink < mLinks.size())
{
if ((mHighMode & BACKGROUND))
{
@@ -423,7 +423,7 @@ int BrowserBox::calcHeight()
}
}
- if (c == '<')
+ if (c == '<' && link < mLinks.size())
{
const int size =
font->getWidth(mLinks[link].caption) + 1;