summaryrefslogtreecommitdiff
path: root/gnome-unstable/epiphany/fix-infinite-loop
diff options
context:
space:
mode:
Diffstat (limited to 'gnome-unstable/epiphany/fix-infinite-loop')
-rw-r--r--gnome-unstable/epiphany/fix-infinite-loop38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnome-unstable/epiphany/fix-infinite-loop b/gnome-unstable/epiphany/fix-infinite-loop
new file mode 100644
index 000000000..7322a0a4c
--- /dev/null
+++ b/gnome-unstable/epiphany/fix-infinite-loop
@@ -0,0 +1,38 @@
+From 087cb32d81fd8ef1cf3f493fce9e80e7217dbf04 Mon Sep 17 00:00:00 2001
+From: Xan Lopez <xan@igalia.com>
+Date: Wed, 21 Mar 2012 14:41:36 +0100
+Subject: [PATCH] profile-migrator: do not freak out if the history is empty
+
+If the old history file exists but has no actual visits we'll enter
+into an infinite loop.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=672547
+---
+ lib/ephy-profile-migrator.c | 10 ++++++----
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/lib/ephy-profile-migrator.c b/lib/ephy-profile-migrator.c
+index f7a3406..a37638c 100644
+--- a/lib/ephy-profile-migrator.c
++++ b/lib/ephy-profile-migrator.c
+@@ -594,11 +594,13 @@ migrate_history ()
+ g_input_stream_close (G_INPUT_STREAM (input), NULL, NULL);
+ g_object_unref (input);
+
+- ephy_history_service_add_visits (history_service, parse_data.visits, NULL, (EphyHistoryJobCallback)visit_cb, NULL);
+- ephy_history_page_visit_list_free (parse_data.visits);
++ if (parse_data.visits) {
++ ephy_history_service_add_visits (history_service, parse_data.visits, NULL, (EphyHistoryJobCallback)visit_cb, NULL);
++ ephy_history_page_visit_list_free (parse_data.visits);
+
+- while (!all_done)
+- g_main_context_iteration (NULL, FALSE);
++ while (!all_done)
++ g_main_context_iteration (NULL, FALSE);
++ }
+
+ g_object_unref (history_service);
+ }
+--
+1.7.7.6
+