Don't compare NULL values from files we can't get permissions for. Fixes

2005-01-27  Martin Wehner  <martin.wehner@epost.de>

	* libnautilus-private/nautilus-file.c:
	(nautilus_file_compare_for_sort_by_attribute):
	Don't compare NULL values from files we can't get permissions for.
	Fixes bug #153890.
This commit is contained in:
Martin Wehner 2005-01-27 19:03:57 +00:00 committed by Martin Wehner
parent c18bd686a7
commit 2e000b4d9c
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2005-01-27 Martin Wehner <martin.wehner@epost.de>
* libnautilus-private/nautilus-file.c:
(nautilus_file_compare_for_sort_by_attribute):
Don't compare NULL values from files we can't get permissions for.
Fixes bug #153890.
2005-01-27 Chris Lahey <clahey@ximian.com>
* acconfig.h, configure.in, src/nautilus-image-properties-page.c:

View file

@ -2341,7 +2341,9 @@ nautilus_file_compare_for_sort_by_attribute (NautilusFile
value_2 = nautilus_file_get_string_attribute (file_2,
attribute);
result = strcmp (value_1, value_2);
if (value_1 != NULL && value_2 != NULL) {
result = strcmp (value_1, value_2);
}
g_free (value_1);
g_free (value_2);