summaryrefslogtreecommitdiffstats
path: root/base/mime_util_xdg.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/mime_util_xdg.cc')
-rw-r--r--base/mime_util_xdg.cc3
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();