aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog5
-rw-r--r--addressbook/printing/e-contact-print.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 68c8a37405..6c6bd06fa6 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,10 @@
2004-01-19 Hans Petter Jansson <hpj@ximian.com>
+ * printing/e-contact-print.c (complete_sequence): Only unref if we
+ have a query.
+
+2004-01-19 Hans Petter Jansson <hpj@ximian.com>
+
* gui/component/addressbook-component.c
(get_primary_source): Implement.
(load_primary_selection): Use get_primary_source ().
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c
index d826a71d41..19e7f6b36f 100644
--- a/addressbook/printing/e-contact-print.c
+++ b/addressbook/printing/e-contact-print.c
@@ -589,7 +589,8 @@ complete_sequence(EBookView *book_view, EBookViewStatus status, EContactPrintCon
g_object_unref(ctxt->master);
if (ctxt->book)
g_object_unref(ctxt->book);
- e_book_query_unref (ctxt->query);
+ if (ctxt->query)
+ e_book_query_unref (ctxt->query);
g_list_foreach(ctxt->contacts, (GFunc) g_object_unref, NULL);
g_list_free(ctxt->contacts);
g_object_unref(ctxt->style->headings_font);
@@ -876,7 +877,6 @@ e_contact_print_response(GtkWidget *dialog, gint response_id, gpointer data)
GList *contact_list = NULL;
gdouble font_size;
-
if (uses_book) {
book = g_object_get_data(G_OBJECT(dialog), "book");
query = g_object_get_data(G_OBJECT(dialog), "query");
@@ -964,6 +964,7 @@ e_contact_print_response(GtkWidget *dialog, gint response_id, gpointer data)
#endif
ctxt->book = book;
ctxt->query = query;
+
if (uses_book) {
ctxt->contacts = NULL;
g_object_ref(book);