[evolution-data-server] EBookBackend: Fixed ref-counting bug in e_book_backend_set_locale()



commit 3025a806ccabc7e4c4e6f522baaaa9726f04dcf9
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Sat Nov 30 03:11:19 2013 +0900

    EBookBackend: Fixed ref-counting bug in e_book_backend_set_locale()

 addressbook/libedata-book/e-book-backend.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-backend.c b/addressbook/libedata-book/e-book-backend.c
index 2e312c5..36d1726 100644
--- a/addressbook/libedata-book/e-book-backend.c
+++ b/addressbook/libedata-book/e-book-backend.c
@@ -3305,17 +3305,19 @@ e_book_backend_set_locale (EBookBackend *backend,
                           GCancellable *cancellable,
                           GError      **error)
 {
+       /* If the backend does not support locales, just happily return */
+       gboolean success = TRUE;
+
        g_return_val_if_fail (E_IS_BOOK_BACKEND (backend), FALSE);
 
        g_object_ref (backend);
 
        if (E_BOOK_BACKEND_GET_CLASS (backend)->set_locale)
-               return (* E_BOOK_BACKEND_GET_CLASS (backend)->set_locale) (backend, locale,
-                                                                          cancellable, error);
+               success = (* E_BOOK_BACKEND_GET_CLASS (backend)->set_locale) (backend, locale,
+                                                                             cancellable, error);
        g_object_unref (backend);
 
-       /* Backend does not support locales, just happily return */
-       return TRUE;
+       return success;
 }
 
 /**


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