From ee1b7e3eefc3ea885754a9a12c7f9b96ec222406 Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Thu, 11 Apr 2013 09:55:59 +0200 Subject: [PATCH] log-iter: skip to next date if the selected one has no events. --- telepathy-logger/log-iter-pidgin.c | 2 ++ telepathy-logger/log-iter-xml.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/telepathy-logger/log-iter-pidgin.c b/telepathy-logger/log-iter-pidgin.c index a9263d4..7c46624 100644 --- a/telepathy-logger/log-iter-pidgin.c +++ b/telepathy-logger/log-iter-pidgin.c @@ -82,6 +82,8 @@ tpl_log_iter_pidgin_get_events (TplLogIter *iter, priv->next_event = g_list_last (priv->events); priv->next_date = g_list_previous (priv->next_date); + + if (priv->next_event == NULL) continue; } event = TPL_EVENT (priv->next_event->data); diff --git a/telepathy-logger/log-iter-xml.c b/telepathy-logger/log-iter-xml.c index 1684a74..c9ae0c2 100644 --- a/telepathy-logger/log-iter-xml.c +++ b/telepathy-logger/log-iter-xml.c @@ -83,6 +83,8 @@ tpl_log_iter_xml_get_events (TplLogIter *iter, priv->next_event = g_list_last (priv->events); priv->next_date = g_list_previous (priv->next_date); + + if (priv->next_event == NULL) continue; } event = TPL_EVENT (priv->next_event->data); -- 1.8.2.1