[epiphany/mcatanzaro/#691] history-manager: avoid critical when deleting URLs not tracked by sync



commit 9818e0b5aac7ea19f1a1d9d430fcc071e8de511d
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Mon Apr 29 16:39:45 2019 -0500

    history-manager: avoid critical when deleting URLs not tracked by sync
    
    Fixes #691

 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]