Index: libgnomevfs/gnome-vfs-utils.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-utils.c,v
retrieving revision 1.106
diff -u -p -r1.106 gnome-vfs-utils.c
--- libgnomevfs/gnome-vfs-utils.c	20 Dec 2005 09:44:43 -0000	1.106
+++ libgnomevfs/gnome-vfs-utils.c	22 Feb 2006 15:05:00 -0000
@@ -2002,6 +2002,15 @@ _gnome_vfs_uri_resolve_all_symlinks_uri 
 			}
 			resolved_uri = gnome_vfs_uri_resolve_relative (new_uri,
 								       info->symlink_name);
+			if (resolved_uri == NULL) {
+				gnome_vfs_uri_unref (new_uri);
+				/* FIXME this shouldn't happen. gnome_vfs_uri_resolve_relative
+				 * treats some relative URIs as absolute if they contain special
+				 * characters. We should escape them, or the relative URI recognition
+				 * should be improved */
+				break;
+			}
+
 			if (*p != 0) {
 				gnome_vfs_uri_unref (new_uri);
 
