diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 20:37:03 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 20:37:03 +0000 |
commit | 963e3b79ce4f2cd35cb9318c14fd259d3cf53318 (patch) | |
tree | 1672e304e303937390c6013500ae4a4ef476270f /chrome/browser/dom_ui | |
parent | 566c896eb6e8e7a3ae227541d6495b85366a60fd (diff) | |
download | chromium_src-963e3b79ce4f2cd35cb9318c14fd259d3cf53318.zip chromium_src-963e3b79ce4f2cd35cb9318c14fd259d3cf53318.tar.gz chromium_src-963e3b79ce4f2cd35cb9318c14fd259d3cf53318.tar.bz2 |
Coverity: Check return value of GetInteger.
CID=6192
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/257013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27763 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r-- | chrome/browser/dom_ui/new_tab_ui.cc | 3 |
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)) |