fix ugly leak and daftness.

2002-08-08  Michael Meeks  <michael@ximian.com>

        * libnautilus-private/nautilus-icon-factory.c
        (nautilus_gdk_pixbuf_supported): fix ugly leak and
        daftness.
This commit is contained in:
Michael Meeks 2002-08-08 09:06:44 +00:00 committed by Michael Meeks
parent fbc80fc2f7
commit 92fb67bcf2
2 changed files with 13 additions and 6 deletions

View file

@ -1,3 +1,9 @@
2002-08-08 Michael Meeks <michael@ximian.com>
* libnautilus-private/nautilus-icon-factory.c
(nautilus_gdk_pixbuf_supported): fix ugly leak and
daftness.
2002-08-07 Federico Mena Quintero <federico@ximian.com>
* libnautilus-private/nautilus-icon-container.c

View file

@ -1166,13 +1166,14 @@ nautilus_gdk_pixbuf_supported (char *mime_type)
"image/x-xpixmap"
};
formats = eel_g_hash_table_new_free_at_exit (
g_str_hash, g_str_equal, "nautilus-icon-factory.c: formats");
if (!formats) {
formats = g_hash_table_new (g_str_hash, g_str_equal);
for (i = 0; i < G_N_ELEMENTS (types); i++)
g_hash_table_insert (formats,
(gpointer) types [i],
GUINT_TO_POINTER (1));
for (i = 0; i < G_N_ELEMENTS (types); i++)
g_hash_table_insert (formats,
(gpointer) types [i],
GUINT_TO_POINTER (1));
}
if (g_hash_table_lookup (formats, mime_type))
return TRUE;