Skip to content
Snippets Groups Projects
Commit 33d3c05c authored by mattm@chromium.org's avatar mattm@chromium.org
Browse files

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
parent 48605848
No related branches found
No related tags found
No related merge requests found
...@@ -54,8 +54,8 @@ void TipsHandler::HandleGetTips(const Value* content) { ...@@ -54,8 +54,8 @@ void TipsHandler::HandleGetTips(const Value* content) {
if (tips_cache_->GetInteger( if (tips_cache_->GetInteger(
WebResourceService::kCurrentTipPrefName, &current_tip_index) && WebResourceService::kCurrentTipPrefName, &current_tip_index) &&
tips_cache_->GetList( tips_cache_->GetList(
WebResourceService::kTipCachePrefName, &wr_list)) { WebResourceService::kTipCachePrefName, &wr_list) &&
if (wr_list && wr_list->GetSize() > 0) wr_list && wr_list->GetSize() > 0) {
if (wr_list->GetSize() <= static_cast<size_t>(current_tip_index)) if (wr_list->GetSize() <= static_cast<size_t>(current_tip_index))
current_tip_index = 0; current_tip_index = 0;
if (wr_list->GetString(current_tip_index, &current_tip)) { if (wr_list->GetString(current_tip_index, &current_tip)) {
...@@ -84,4 +84,3 @@ bool TipsHandler::IsValidURL(const std::wstring& url_string) { ...@@ -84,4 +84,3 @@ bool TipsHandler::IsValidURL(const std::wstring& url_string) {
return !url.is_empty() && (url.SchemeIs(chrome::kHttpScheme) || return !url.is_empty() && (url.SchemeIs(chrome::kHttpScheme) ||
url.SchemeIs(chrome::kHttpsScheme)); url.SchemeIs(chrome::kHttpsScheme));
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment