summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index 073594a..e035bc9 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -842,8 +842,7 @@ const bool MostVisitedHandler::GetPinnedURLAtIndex(const int index,
int dict_index;
DictionaryValue* dict = static_cast<DictionaryValue*>(value);
- dict->GetInteger(L"index", &dict_index);
- if (dict_index == index) {
+ if (dict->GetInteger(L"index", &dict_index) && dict_index == index) {
// The favicon and thumbnail URLs may be empty.
std::string tmp_string;
if (dict->GetString(L"faviconUrl", &tmp_string))