From 25a7c643d44b7d5c858e2b24b1bd7679777eabb8 Mon Sep 17 00:00:00 2001 From: Monsta Date: Fri, 21 Aug 2015 19:05:22 +0300 Subject: logview: make sure to always NULL-terminate log lines array from https://git.gnome.org/browse/gnome-system-log/commit/?id=af6e5f3fd809ec7e477434e8279d1b2f8817f33d --- logview/logview-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/logview/logview-log.c b/logview/logview-log.c index 2f752b02..602f78a7 100644 --- a/logview/logview-log.c +++ b/logview/logview-log.c @@ -295,14 +295,14 @@ do_read_new_lines (GIOSchedulerJob *io_job, g_ptr_array_add (lines, (gpointer) line); } + /* NULL-terminate the array again */ + g_ptr_array_add (lines, NULL); + if (err) { job->err = err; goto out; } - /* NULL-terminate the array again */ - g_ptr_array_add (lines, NULL); - log->priv->has_new_lines = FALSE; /* we'll return only the new lines in the callback */ -- cgit v1.2.1