File gnome-panel-recent-check-exists.patch of Package gnome-panel

Index: gnome-panel/panel-recent.c
===================================================================
--- gnome-panel/panel-recent.c.orig	2009-11-13 00:55:26.000000000 +1100
+++ gnome-panel/panel-recent.c	2010-01-14 11:31:23.000000000 +1100
@@ -44,6 +44,22 @@ static gboolean
 show_uri (const char *uri, const char *mime_type, GdkScreen *screen,
 	  GError **error)
 {
+	GFile *file;
+	char *path;
+
+	file = g_file_new_for_uri (uri);
+	path = g_file_get_path (file);
+	if (g_file_is_native (file) &&
+	    !g_file_test (path, G_FILE_TEST_EXISTS)) {
+		g_set_error (error, 0, 0, _("%s does not exist."), path);
+		g_object_unref (file);
+		g_free (path);
+
+		return FALSE;
+	}
+	g_object_unref (file);
+	g_free (path);
+
 	return panel_show_uri_force_mime_type (screen, uri, mime_type,
 					       gtk_get_current_event_time (),
 					       error);