From 909a8856efee40ebffcae2682c9c969bffa73211 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 30 May 2020 17:09:40 +0100 Subject: [PATCH] Initialize the visited time of a new GBookmarkFile Just like we do for the other fields. Otherwise, when we serialise the item, we're going to hit a segmentation fault when trying to format a NULL GDateTime. --- glib/gbookmarkfile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/glib/gbookmarkfile.c b/glib/gbookmarkfile.c index 5b612127a..d796b253a 100644 --- a/glib/gbookmarkfile.c +++ b/glib/gbookmarkfile.c @@ -2041,6 +2041,9 @@ g_bookmark_file_add_item (GBookmarkFile *bookmark, if (item->modified == NULL) item->modified = g_date_time_new_now_utc (); + + if (item->visited == NULL) + item->visited = g_date_time_new_now_utc (); } /**