nautilus r13852 - in trunk: . libnautilus-private src



Author: cneumair
Date: Thu Feb 28 18:56:46 2008
New Revision: 13852
URL: http://svn.gnome.org/viewvc/nautilus?rev=13852&view=rev

Log:
2008-02-28  Christian Neumair  <cneumair gnome org>

	* libnautilus-private/nautilus-file.c: (nautilus_file_get_gicon):
	Handle NULL file.
	* src/nautilus-bookmark-list.c: (nautilus_bookmark_list_load_file):
	Ignore lines beginning with a space (#512593).


Modified:
   trunk/ChangeLog
   trunk/libnautilus-private/nautilus-file.c
   trunk/src/nautilus-bookmark-list.c

Modified: trunk/libnautilus-private/nautilus-file.c
==============================================================================
--- trunk/libnautilus-private/nautilus-file.c	(original)
+++ trunk/libnautilus-private/nautilus-file.c	Thu Feb 28 18:56:46 2008
@@ -3269,6 +3269,10 @@
 	int i;
 	gboolean changed;
 
+	if (file == NULL) {
+		return NULL;
+	}
+
 	if (file->details->icon) {
 		icon = NULL;
 		

Modified: trunk/src/nautilus-bookmark-list.c
==============================================================================
--- trunk/src/nautilus-bookmark-list.c	(original)
+++ trunk/src/nautilus-bookmark-list.c	Thu Feb 28 18:56:46 2008
@@ -453,7 +453,8 @@
 
 		lines = g_strsplit (contents, "\n", -1);
       	 	for (i = 0; lines[i]; i++) {
-	  		if (lines[i][0]) {
+			/* Ignore empty or invalid lines that cannot be parsed properly */
+	  		if (lines[i][0] != '\0' && lines[i][0] != ' ') {
 				/* gtk 2.7/2.8 might have labels appended to bookmarks which are separated by a space */
 				/* we must seperate the bookmark uri and the potential label */
  				char *space, *label;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]