? mime-debug.diff
Index: libgnomevfs/xdgmime.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/xdgmime.c,v
retrieving revision 1.8
diff -u -r1.8 xdgmime.c
--- libgnomevfs/xdgmime.c	9 Dec 2004 15:43:48 -0000	1.8
+++ libgnomevfs/xdgmime.c	21 Jun 2005 08:19:12 -0000
@@ -372,7 +372,7 @@
     {
       xdg_mime_shutdown ();
     }
-
+  printf ("xdg_mime_init: %d\n", need_reread);
   if (need_reread)
     {
       global_hash = _xdg_glob_hash_new ();
@@ -385,6 +385,7 @@
 
       need_reread = FALSE;
     }
+  printf ("xdg_mime_init2: %p\n", global_hash);
 }
 
 const char *
@@ -473,7 +474,7 @@
   const char *mime_type;
 
   xdg_mime_init ();
-
+  printf ("xdg_mime_get_mime_type_from_file_name: %p\n", global_hash);
   mime_type = _xdg_glob_hash_lookup_file_name (global_hash, file_name);
   if (mime_type)
     return mime_type;
Index: libgnomevfs/xdgmimeglob.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/xdgmimeglob.c,v
retrieving revision 1.9
diff -u -r1.9 xdgmimeglob.c
--- libgnomevfs/xdgmimeglob.c	10 Jan 2005 13:52:22 -0000	1.9
+++ libgnomevfs/xdgmimeglob.c	21 Jun 2005 08:19:12 -0000
@@ -291,7 +291,7 @@
   /* First, check the literals */
 
   assert (file_name != NULL);
-
+  assert (glob_hash != NULL);
   for (list = glob_hash->literal_list; list; list = list->next)
     if (strcmp ((const char *)list->data, file_name) == 0)
       return list->mime_type;
