[gnome-color-manager] trivial: ignore the empty values of the DnD string array



commit 41e409088b130fe1d56354eaaa4166c80463add6
Author: Richard Hughes <richard hughsie com>
Date:   Thu Feb 18 13:27:37 2010 +0000

    trivial: ignore the empty values of the DnD string array

 src/gcm-prefs.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index d96002c..c86bbbf 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -581,6 +581,10 @@ gcm_prefs_drag_data_received_cb (GtkWidget *widget, GdkDragContext *context, gin
 	filenames = g_strsplit_set ((const gchar *)filename, "\r\n", -1);
 	for (i=0; filenames[i]!=NULL; i++) {
 
+		/* blank entry */
+		if (filenames[i][0] == '\0')
+			continue;
+
 		/* check this is an ICC profile */
 		file = g_file_new_for_path (filenames[i]);
 		ret = gcm_utils_is_icc_profile (file);



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