aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-minicard-view-widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/widgets/e-minicard-view-widget.c')
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c
index 8e9f3c2761..25dbf8d272 100644
--- a/addressbook/gui/widgets/e-minicard-view-widget.c
+++ b/addressbook/gui/widgets/e-minicard-view-widget.c
@@ -138,6 +138,7 @@ e_minicard_view_widget_new (EAddressbookReflowAdapter *adapter)
EMinicardViewWidget *widget = E_MINICARD_VIEW_WIDGET (gtk_type_new (e_minicard_view_widget_get_type ()));
widget->adapter = adapter;
+ gtk_object_ref (GTK_OBJECT (widget->adapter));
return GTK_WIDGET (widget);
}
@@ -212,7 +213,9 @@ e_minicard_view_widget_destroy (GtkObject *object)
if (view->book)
gtk_object_unref(GTK_OBJECT(view->book));
g_free(view->query);
-
+
+ gtk_object_unref (GTK_OBJECT (view->adapter));
+
GTK_OBJECT_CLASS(parent_class)->destroy (object);
}
@@ -335,4 +338,6 @@ e_minicard_view_widget_get_selection_model (EMinicardViewWidget *view)
{
if (view->emv)
return E_SELECTION_MODEL (E_REFLOW (view->emv)->selection);
+ else
+ return NULL;
}