[epiphany] ephy-bookmark: Do not crash if time is negative
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-bookmark: Do not crash if time is negative
- Date: Tue, 24 Dec 2019 15:43:14 +0000 (UTC)
commit dd9f4c26d25ee75d4873d4d9bed350b2f6c19d54
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Tue Dec 24 12:40:26 2019 +0100
ephy-bookmark: Do not crash if time is negative
Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/454
src/bookmarks/ephy-bookmark.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/bookmarks/ephy-bookmark.c b/src/bookmarks/ephy-bookmark.c
index 5bb2706ec..5d84213ef 100644
--- a/src/bookmarks/ephy-bookmark.c
+++ b/src/bookmarks/ephy-bookmark.c
@@ -306,9 +306,8 @@ ephy_bookmark_set_time_added (EphyBookmark *self,
gint64 time_added)
{
g_assert (EPHY_IS_BOOKMARK (self));
- g_assert (time_added >= 0);
- self->time_added = time_added;
+ self->time_added = (time_added >= 0 ? time_added : g_get_real_time ());
}
gint64
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]