X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-dnd.c;h=6c40d8b93ea98bc401e9c192930472b232e88066;hp=a718366c2563c0ce042a833b469a9cc229c87d8c;hb=4efb7a24ade8eb1e0106f0dbf0f13c25c8a61453;hpb=aa217bb73f75e470e94184a592701176623bcc1f diff --git a/src/widgets/modest-dnd.c b/src/widgets/modest-dnd.c index a718366..6c40d8b 100644 --- a/src/widgets/modest-dnd.c +++ b/src/widgets/modest-dnd.c @@ -50,20 +50,18 @@ modest_dnd_selection_data_set_paths (GtkSelectionData *selection_data, if (selection_data->target == tree_path_as_string_list_atom) { GString *list; - gint i; gchar *result; GList *row; row = selected_rows; list = g_string_new (NULL); - for (i = 0; idata)); - g_string_append (list, "\n"); row = g_list_next (row); + if (row != NULL) + g_string_append (list, "\n"); } - /* Do not include the delimiter in the last one */ - g_string_append (list, gtk_tree_path_to_string (row->data)); result = g_strdup (list->str); g_string_free (list, TRUE); @@ -89,7 +87,7 @@ modest_dnd_selection_data_get_paths (GtkSelectionData *selection_data) if (selection_data->length >= 0 && selection_data->type == tree_path_as_string_list_atom) { - result = g_strsplit (selection_data->data, "\n", 0); + result = g_strsplit ((const gchar*)selection_data->data, "\n", 0); } return result; }