Call set_errcall() earlier, so it can catch errors in env->open.
authorRoss Burton <ross@openedhand.com>
Mon, 21 May 2007 13:32:21 +0000 (13:32 +0000)
committerRoss Burton <rburton@src.gnome.org>
Mon, 21 May 2007 13:32:21 +0000 (13:32 +0000)
2007-05-21  Ross Burton  <ross@openedhand.com>

* backends/file/e-book-backend-file.c:
Call set_errcall() earlier, so it can catch errors in env->open.

svn path=/trunk/; revision=7769

addressbook/ChangeLog
addressbook/backends/file/e-book-backend-file.c

index bb0cab4..68fe587 100644 (file)
@@ -1,6 +1,11 @@
 2007-05-21  Ross Burton  <ross@openedhand.com>
 
        * backends/file/e-book-backend-file.c:
+       Call set_errcall() earlier, so it can catch errors in env->open.
+
+2007-05-21  Ross Burton  <ross@openedhand.com>
+
+       * backends/file/e-book-backend-file.c:
        Move a g_free to the correct place, to avoid calling g_free (NULL).
 
 2007-05-20  Ross Burton  <ross@openedhand.com>
index abd33d4..d4d3520 100644 (file)
@@ -1100,6 +1100,8 @@ e_book_backend_file_load_source (EBookBackend           *backend,
                        return db_error_to_status (db_error);
                }
 
+               env->set_errcall (env, file_errcall);
+
                /* Set the allocation routines to the non-aborting GLib functions */
                env->set_alloc (env, (void *(*)(size_t))g_try_malloc, 
                                (void *(*)(void *, size_t))g_try_realloc,
@@ -1115,8 +1117,6 @@ e_book_backend_file_load_source (EBookBackend           *backend,
                        return db_error_to_status (db_error);
                }
 
-               env->set_errcall (env, file_errcall);
-
                global_env.env = env;
                global_env.ref_count = 1;
        }