diff options
author | craig.schlenter@chromium.org <craig.schlenter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-11 04:44:51 +0000 |
---|---|---|
committer | craig.schlenter@chromium.org <craig.schlenter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-11 04:44:51 +0000 |
commit | 6948800159a0769503b2080aec4596c3665b8951 (patch) | |
tree | 67185201200e70c6bc1d4210c82365ae08d79ef3 /base | |
parent | 4c66d2a859776c05767f05472cbfa9519ca01aff (diff) | |
download | chromium_src-6948800159a0769503b2080aec4596c3665b8951.zip chromium_src-6948800159a0769503b2080aec4596c3665b8951.tar.gz chromium_src-6948800159a0769503b2080aec4596c3665b8951.tar.bz2 |
Linux: Don't crash when installing an extension if the gtk icon theme inherits from itself.
Inheriting from itself means the theme is buggy but we shouldn't crash.
BUG=43493
Review URL: http://codereview.chromium.org/2007007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46890 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/mime_util_xdg.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/mime_util_xdg.cc b/base/mime_util_xdg.cc index b42122f..3f6227e 100644 --- a/base/mime_util_xdg.cc +++ b/base/mime_util_xdg.cc @@ -207,7 +207,8 @@ FilePath IconTheme::GetIconPath(const std::string& icon_name, int size, return icon_path; IconTheme* theme = LoadTheme(inherits_); - if (theme) + // Inheriting from itself means the theme is buggy but we shouldn't crash. + if (theme && theme != this) return theme->GetIconPath(icon_name, size, inherits); else return FilePath(); |