# Reference counting error in Google backend
# Fix from Matthew Barnes <mbarnes@redhat.com> ported to 2.30 by Baptiste Mille-Mathias <baptiste.millemathias@gmail.com>
# http://git.gnome.org/browse/evolution-data-server/commit/?id=2440b4744a2f12abfd1bd616a5e72a9faf879b96
--- evolution-data-server-2.22.1.orig/addressbook/backends/google/e-book-backend-google.c	2010-09-04 11:54:10.447797001 +0200
+++ evolution-data-server-2.22.1/addressbook/backends/google/e-book-backend-google.c         2010-09-04 11:55:04.167797001 +0200
@@ -328,12 +328,15 @@ e_book_backend_google_stop_book_view (EB
 				      EDataBookView *bookview)
 {
     EBookBackendGooglePrivate *priv;
+    GList *link;
 
     __debug__ (G_STRFUNC);
     priv = GET_PRIVATE (backend);
 
-    priv->bookviews = g_list_remove (priv->bookviews, bookview);
-    e_data_book_view_unref (bookview);
+    if ((link = g_list_find (priv->bookviews, bookview)) != NULL) {
+        priv->bookviews = g_list_remove (priv->bookviews, bookview);
+        e_data_book_view_unref (bookview);
+    };
 
     if (NULL == priv->bookviews) {
 	google_book_set_live_mode (priv->book, FALSE);