Index: gtkrecentmanager.c
===================================================================
--- gtkrecentmanager.c	(revision 20261)
+++ gtkrecentmanager.c	(working copy)
@@ -762,12 +762,15 @@ gtk_recent_manager_add_item_query_info (
   recent_data.display_name = NULL;
   recent_data.description = NULL;
 
+  recent_data.mime_type = NULL;
   if (file_info)
     {
-      recent_data.mime_type = g_content_type_get_mime_type (g_file_info_get_content_type (file_info));
+      const char *content_type = g_file_info_get_content_type (file_info);
+      if (content_type)
+	recent_data.mime_type = g_content_type_get_mime_type (content_type);
       g_object_unref (file_info);
     }
-  else
+  if (!recent_data.mime_type)
     recent_data.mime_type = g_strdup (GTK_RECENT_DEFAULT_MIME);
 
   recent_data.app_name = g_strdup (g_get_application_name ());
