[glib/bookmark-visited] Initialize the visited time of a new GBookmarkFile
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/bookmark-visited] Initialize the visited time of a new GBookmarkFile
- Date: Sat, 30 May 2020 16:11:18 +0000 (UTC)
commit 909a8856efee40ebffcae2682c9c969bffa73211
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat May 30 17:09:40 2020 +0100
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 ();
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]