[epiphany/mcatanzaro/more-scan-build] bookmarks-manager: add assertion



commit bdfd709795b4c87d2acbd35e1035e42ac0533331
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Fri Dec 27 11:29:55 2019 -0600

    bookmarks-manager: add assertion
    
    If this function fails, error had better be set. scan-build gets tripped
    up here otherwise.

 src/bookmarks/ephy-bookmarks-manager.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/bookmarks/ephy-bookmarks-manager.c b/src/bookmarks/ephy-bookmarks-manager.c
index 09513dc8d..094d42439 100644
--- a/src/bookmarks/ephy-bookmarks-manager.c
+++ b/src/bookmarks/ephy-bookmarks-manager.c
@@ -228,8 +228,10 @@ ephy_bookmarks_manager_init (EphyBookmarksManager *self)
 
   /* Create DB file if it doesn't already exists */
   if (!g_file_test (self->gvdb_filename, G_FILE_TEST_EXISTS)) {
-    if (!ephy_bookmarks_manager_save_sync (self, &error))
+    if (!ephy_bookmarks_manager_save_sync (self, &error)) {
+      g_assert (error);
       g_warning ("Failed to save bookmarks: %s", error->message);
+    }
   }
 
   ephy_bookmarks_import (self, self->gvdb_filename, NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]