Free gIconFactory in GTK nsIconChannel implementation. (Bug 488184) r=karlt

This commit is contained in:
L. David Baron 2009-04-16 13:55:12 -07:00
parent d4cfc53cd6
commit 14909517dc

View File

@ -191,7 +191,6 @@ ensure_icon_factory()
if (!gIconFactory) {
gIconFactory = gtk_icon_factory_new();
gtk_icon_factory_add_default(gIconFactory);
g_object_unref(gIconFactory);
}
}
#endif
@ -520,6 +519,13 @@ nsIconChannel::Shutdown() {
gProtoWindow = nsnull;
gStockImageWidget = nsnull;
}
#if GTK_CHECK_VERSION(2,4,0)
if (gIconFactory) {
gtk_icon_factory_remove_default(gIconFactory);
g_object_unref(gIconFactory);
gIconFactory = nsnull;
}
#endif
#ifdef MOZ_ENABLE_GNOMEUI
if (gIconTheme) {
g_object_unref(G_OBJECT(gIconTheme));