[epiphany] Fix ephy_bookmarks_manager_save_sync()
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Fix ephy_bookmarks_manager_save_sync()
- Date: Thu, 27 Jun 2019 22:43:28 +0000 (UTC)
commit 5ec1d92a000036c5fd00bbca2a0ca8120a057b09
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Thu Jun 27 17:41:59 2019 -0500
Fix ephy_bookmarks_manager_save_sync()
This is causing crashes on startup when running with -p, because we do a
sync save of the bookmarks file if it doesn't already exist when
creating the bookmarks manager.
src/bookmarks/ephy-bookmarks-manager.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/bookmarks/ephy-bookmarks-manager.c b/src/bookmarks/ephy-bookmarks-manager.c
index f44a4a9c3..f7148a879 100644
--- a/src/bookmarks/ephy-bookmarks-manager.c
+++ b/src/bookmarks/ephy-bookmarks-manager.c
@@ -681,7 +681,7 @@ ephy_bookmarks_manager_save_sync (EphyBookmarksManager *self,
gboolean result;
context = g_main_context_new ();
- data = g_new (SaveToFileData, 1);
+ data = g_new0 (SaveToFileData, 1);
data->main_loop = g_main_loop_new (context, FALSE);
g_main_context_push_thread_default (context);
@@ -690,7 +690,8 @@ ephy_bookmarks_manager_save_sync (EphyBookmarksManager *self,
g_main_context_pop_thread_default (context);
result = data->result;
- g_propagate_error (error, data->error);
+ if (data->error)
+ g_propagate_error (error, data->error);
g_main_loop_unref (data->main_loop);
g_free (data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]