[epiphany/gnome-3-32] history-manager: avoid critical when deleting URLs not tracked by sync
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-32] history-manager: avoid critical when deleting URLs not tracked by sync
- Date: Wed, 1 May 2019 21:51:36 +0000 (UTC)
commit 7be86b8b66afa396f6c0a94ee9dd75f16f924acb
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Mon Apr 29 21:39:45 2019 +0000
history-manager: avoid critical when deleting URLs not tracked by sync
Fixes #691
(cherry picked from commit 7e7aa0fbd26147bb2b0aadd1e67fb3f65d9937e6)
lib/sync/ephy-history-manager.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/lib/sync/ephy-history-manager.c b/lib/sync/ephy-history-manager.c
index 31914357d..4fa69cce9 100644
--- a/lib/sync/ephy-history-manager.c
+++ b/lib/sync/ephy-history-manager.c
@@ -91,6 +91,9 @@ url_visited_cb (EphyHistoryService *service,
{
EphyHistoryRecord *record;
+ if (!url->sync_id)
+ return;
+
record = ephy_history_record_new (url->sync_id, url->title, url->url, url->last_visit_time);
g_signal_emit_by_name (self, "synchronizable-modified", record, TRUE);
g_object_unref (record);
@@ -103,6 +106,9 @@ url_deleted_cb (EphyHistoryService *service,
{
EphyHistoryRecord *record;
+ if (!url->sync_id)
+ return;
+
record = ephy_history_record_new (url->sync_id, url->title, url->url, url->last_visit_time);
g_signal_emit_by_name (self, "synchronizable-deleted", record);
g_object_unref (record);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]