mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
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.
This commit is contained in:
parent
3d0e1f5c85
commit
909a8856ef
@ -2041,6 +2041,9 @@ g_bookmark_file_add_item (GBookmarkFile *bookmark,
|
|||||||
|
|
||||||
if (item->modified == NULL)
|
if (item->modified == NULL)
|
||||||
item->modified = g_date_time_new_now_utc ();
|
item->modified = g_date_time_new_now_utc ();
|
||||||
|
|
||||||
|
if (item->visited == NULL)
|
||||||
|
item->visited = g_date_time_new_now_utc ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user