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

Unified Diff: chrome/browser/ui/gtk/gtk_theme_service.cc

Issue 10657036: [linux] fix (inconsistent) crash when switching themes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/gtk_theme_service.cc
diff --git a/chrome/browser/ui/gtk/gtk_theme_service.cc b/chrome/browser/ui/gtk/gtk_theme_service.cc
index 3dc11d9a3b0bc08311d6889e8442b533b2792bd7..2a3dc4631db649edce2658ce6f6341f62db75c3f 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -578,10 +578,8 @@ gfx::Image GtkThemeService::GetFolderIcon(bool native) {
// This seems to leak.
GdkPixbuf* pixbuf = gtk_widget_render_icon(
icon_widget_, GTK_STOCK_DIRECTORY, GTK_ICON_SIZE_MENU, NULL);
- if (pixbuf) {
+ if (pixbuf)
default_folder_icon_.Get() = gfx::Image(pixbuf);
- g_object_unref(pixbuf);
- }
}
if (!default_folder_icon_.Get().IsEmpty())
return default_folder_icon_.Get();
@@ -601,10 +599,8 @@ gfx::Image GtkThemeService::GetDefaultFavicon(bool native) {
// This seems to leak.
GdkPixbuf* pixbuf = gtk_widget_render_icon(
icon_widget_, GTK_STOCK_FILE, GTK_ICON_SIZE_MENU, NULL);
- if (pixbuf) {
+ if (pixbuf)
default_bookmark_icon_.Get() = gfx::Image(pixbuf);
- g_object_unref(pixbuf);
- }
}
if (!default_bookmark_icon_.Get().IsEmpty())
return default_bookmark_icon_.Get();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698