Index: libnautilus-private/nautilus-file.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file.c,v
retrieving revision 1.390
diff -u -p -r1.390 nautilus-file.c
--- libnautilus-private/nautilus-file.c	25 Jul 2006 14:18:03 -0000	1.390
+++ libnautilus-private/nautilus-file.c	5 Oct 2006 09:54:00 -0000
@@ -2838,19 +2838,24 @@ nautilus_file_get_uri (NautilusFile *fil
 	g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);
 
 	if (nautilus_file_is_self_owned (file)) {
-		return g_strdup (file->details->directory->details->uri);
+		uri = g_strdup (file->details->directory->details->uri);
+		g_assert (uri != NULL);
+		return uri;
 	}
 
 	vfs_uri = nautilus_file_get_gnome_vfs_uri (file);
 	if (vfs_uri != NULL) {
 		uri = gnome_vfs_uri_to_string (vfs_uri, GNOME_VFS_URI_HIDE_NONE);
+		g_assert (uri != NULL);
 		gnome_vfs_uri_unref (vfs_uri);
 		return uri;
 	}
 
-	return g_strconcat (file->details->directory->details->uri,
-			    file->details->relative_uri,
-			    NULL);
+	uri = g_strconcat (file->details->directory->details->uri,
+			   file->details->relative_uri,
+			   NULL);
+	g_assert (uri != NULL);
+	return uri;
 }
 
 char *
