summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid King <davidk@gnome.org>2019-02-11 08:46:08 +0000
committerDavid King <davidk@gnome.org>2019-02-11 08:46:08 +0000
commit7d0062a4ab36d457b74fe17b8d494570d4a0334b (patch)
tree851f22e907fef285f99dd0d23ff29db8b0c81ce1
parent667fc57d9999c2312af17922cdbe1bed92a72645 (diff)
downloadgnome-logs-7d0062a4ab36d457b74fe17b8d494570d4a0334b.tar.gz
Avoid segfault when updating latest timestamp
https://bugzilla.redhat.com/show_bug.cgi?id=1652642
-rw-r--r--src/gl-journal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gl-journal.c b/src/gl-journal.c
index 4edb1a6..26815cb 100644
--- a/src/gl-journal.c
+++ b/src/gl-journal.c
@@ -94,8 +94,7 @@ gl_journal_update_latest_timestamp (GlJournal *journal)
g_warning ("Error retrieving the sender timestamps: %s",
g_strerror (-r));
}
-
- if (realtime > boot_id->realtime_last)
+ else if (realtime > boot_id->realtime_last)
{
boot_id->realtime_last = realtime;
}