diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 21:07:19 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 21:07:19 +0000 |
commit | 33d3c05c9316a96b2d11069ca091df08d55baf5a (patch) | |
tree | d1c84857e51c2b4d011208b1c8efdc3b7a2c0a7d | |
parent | 4860584843c8eec3b2d914b441ce5412aaef874d (diff) | |
download | chromium_src-33d3c05c9316a96b2d11069ca091df08d55baf5a.zip chromium_src-33d3c05c9316a96b2d11069ca091df08d55baf5a.tar.gz chromium_src-33d3c05c9316a96b2d11069ca091df08d55baf5a.tar.bz2 |
Fix check for wr_list validity not covering entire use.
(Coverity FORWARD_NULL error CID 6043.)
BUG=17101
TEST=none
Review URL: http://codereview.chromium.org/209038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26607 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/dom_ui/tips_handler.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/dom_ui/tips_handler.cc b/chrome/browser/dom_ui/tips_handler.cc index be9ffba..06f73f3 100644 --- a/chrome/browser/dom_ui/tips_handler.cc +++ b/chrome/browser/dom_ui/tips_handler.cc @@ -54,8 +54,8 @@ void TipsHandler::HandleGetTips(const Value* content) { if (tips_cache_->GetInteger( WebResourceService::kCurrentTipPrefName, ¤t_tip_index) && tips_cache_->GetList( - WebResourceService::kTipCachePrefName, &wr_list)) { - if (wr_list && wr_list->GetSize() > 0) + WebResourceService::kTipCachePrefName, &wr_list) && + wr_list && wr_list->GetSize() > 0) { if (wr_list->GetSize() <= static_cast<size_t>(current_tip_index)) current_tip_index = 0; if (wr_list->GetString(current_tip_index, ¤t_tip)) { @@ -84,4 +84,3 @@ bool TipsHandler::IsValidURL(const std::wstring& url_string) { return !url.is_empty() && (url.SchemeIs(chrome::kHttpScheme) || url.SchemeIs(chrome::kHttpsScheme)); } - |