diff options
author | csilv@chromium.org <csilv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 19:44:08 +0000 |
---|---|---|
committer | csilv@chromium.org <csilv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 19:44:08 +0000 |
commit | 8874e02178746958ffdf674866bc86087f7dea46 (patch) | |
tree | f92c85b60b51c922f348c28853ffcdfccef9f80b /chrome/browser/extensions/extension_menu_manager.cc | |
parent | 23db9f7756b518c5655e44e3280f9af7df91879a (diff) | |
download | chromium_src-8874e02178746958ffdf674866bc86087f7dea46.zip chromium_src-8874e02178746958ffdf674866bc86087f7dea46.tar.gz chromium_src-8874e02178746958ffdf674866bc86087f7dea46.tar.bz2 |
Coverity: Fix various NULL_RETURNS defects.
CID=8699, 13592, 14444, 14510, 14658, 14805, 14897
BUG=none
Review URL: http://codereview.chromium.org/6672016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77845 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_menu_manager.cc')
-rw-r--r-- | chrome/browser/extensions/extension_menu_manager.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_menu_manager.cc b/chrome/browser/extensions/extension_menu_manager.cc index df6eaff..f364787 100644 --- a/chrome/browser/extensions/extension_menu_manager.cc +++ b/chrome/browser/extensions/extension_menu_manager.cc @@ -232,7 +232,9 @@ bool ExtensionMenuManager::RemoveContextMenuItem( if (!ContainsKey(items_by_id_, id)) return false; - std::string extension_id = GetItemById(id)->extension_id(); + ExtensionMenuItem* menu_item = GetItemById(id); + DCHECK(menu_item); + std::string extension_id = menu_item->extension_id(); MenuItemMap::iterator i = context_items_.find(extension_id); if (i == context_items_.end()) { NOTREACHED(); |