Commit f71434d2 authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

Handle NULL file. Ignore lines beginning with a space (#512593).

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).

svn path=/trunk/; revision=13852
parent b4dc15a0
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).
2008-02-28 Alexander Larsson <alexl@redhat.com>
* src/file-manager/fm-directory-view.c:
......
......@@ -3269,6 +3269,10 @@ nautilus_file_get_gicon (NautilusFile *file,
int i;
gboolean changed;
if (file == NULL) {
return NULL;
}
if (file->details->icon) {
icon = NULL;
......
......@@ -453,7 +453,8 @@ nautilus_bookmark_list_load_file (NautilusBookmarkList *bookmarks)
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment