aboutsummaryrefslogtreecommitdiff
path: root/libplanfahr/lpf-stop.c
diff options
context:
space:
mode:
Diffstat (limited to 'libplanfahr/lpf-stop.c')
-rw-r--r--libplanfahr/lpf-stop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libplanfahr/lpf-stop.c b/libplanfahr/lpf-stop.c
index 5295fb4..3c733bc 100644
--- a/libplanfahr/lpf-stop.c
+++ b/libplanfahr/lpf-stop.c
@@ -196,8 +196,10 @@ lpf_stop_finalize (GObject *object)
LpfStopPrivate *priv = GET_PRIVATE (self);
GObjectClass *parent_class = G_OBJECT_CLASS (lpf_stop_parent_class);
- g_date_time_unref (priv->dep);
- g_date_time_unref (priv->arr);
+ if (priv->dep)
+ g_date_time_unref (priv->dep);
+ if (priv->arr)
+ g_date_time_unref (priv->arr);
g_free (priv->name);
g_free (priv->arr_plat);
g_free (priv->dep_plat);