summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/mime_util_linux.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/base/mime_util_linux.cc b/base/mime_util_linux.cc
index 4e849bf..a248bc0 100644
--- a/base/mime_util_linux.cc
+++ b/base/mime_util_linux.cc
@@ -511,6 +511,16 @@ void InitDefaultThemes() {
}
// hicolor needs to be last per icon theme spec.
default_themes[3] = IconTheme::LoadTheme("hicolor");
+
+ for (size_t i = 0; i < MimeUtilConstants::kDefaultThemeNum; i++) {
+ if (default_themes[i] == NULL)
+ continue;
+ // NULL out duplicate pointers.
+ for (size_t j = i + 1; j < MimeUtilConstants::kDefaultThemeNum; j++) {
+ if (default_themes[j] == default_themes[i])
+ default_themes[j] = NULL;
+ }
+ }
}
// Try to find an icon with the name |icon_name| that's |size| pixels.