Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Unified Diff: base/mime_util_linux.cc

Issue 124001: Linux: fix icon theme double free on shutdown.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/gtk/download_item_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mime_util_linux.cc
===================================================================
--- base/mime_util_linux.cc (revision 18182)
+++ base/mime_util_linux.cc (working copy)
@@ -511,6 +511,16 @@
}
// 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.
« no previous file with comments | « no previous file | chrome/browser/gtk/download_item_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698