aboutsummaryrefslogtreecommitdiff
path: root/src/uplanfahrtripview.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uplanfahrtripview.c')
-rw-r--r--src/uplanfahrtripview.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/uplanfahrtripview.c b/src/uplanfahrtripview.c
index 7e6306b..a24b04d 100644
--- a/src/uplanfahrtripview.c
+++ b/src/uplanfahrtripview.c
@@ -90,7 +90,7 @@ u_plan_fahr_trip_view_store_trips (UPlanFahrTripView *self, GSList *trips)
UPlanFahrTripViewPrivate *priv;
GtkTreeIter iter;
- GSList *parts;
+ GSList *parts, *trip;
LpfTrip *tripobj;
LpfTripPart *firstpart, *lastpart;
LpfStop *start, *end;
@@ -102,8 +102,8 @@ u_plan_fahr_trip_view_store_trips (UPlanFahrTripView *self, GSList *trips)
priv = u_plan_fahr_trip_view_get_instance_private (U_PLAN_FAHR_TRIP_VIEW (self));
gtk_list_store_clear (priv->liststore);
- for (; trips; trips = g_slist_next (trips)) {
- tripobj = trips->data;
+ for (trip = trips; trip; trip = g_slist_next (trip)) {
+ tripobj = trip->data;
g_object_get(tripobj, "parts", &parts, NULL);
firstpart = LPF_TRIP_PART(parts->data);
@@ -154,4 +154,5 @@ u_plan_fahr_trip_view_store_trips (UPlanFahrTripView *self, GSList *trips)
g_free (dep_delay);
g_free (arr_delay);
}
+ g_slist_free_full (trips, g_object_unref);
}