summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/src/BackForwardListClientImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/src/BackForwardListClientImpl.cpp')
-rw-r--r--WebKit/chromium/src/BackForwardListClientImpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/WebKit/chromium/src/BackForwardListClientImpl.cpp b/WebKit/chromium/src/BackForwardListClientImpl.cpp
index 8feae32..f5b04ab 100644
--- a/WebKit/chromium/src/BackForwardListClientImpl.cpp
+++ b/WebKit/chromium/src/BackForwardListClientImpl.cpp
@@ -90,7 +90,7 @@ HistoryItem* BackForwardListClientImpl::currentItem()
HistoryItem* BackForwardListClientImpl::itemAtIndex(int index)
{
- if (!m_webView->client())
+ if (!m_webView->client() || index > forwardListCount() || -index > backListCount())
return 0;
// Since we don't keep the entire back/forward list, we have no way to