aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-addressbook-table-adapter.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-table-adapter.c')
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c
index 38596fd0f0..b54b2bcea8 100644
--- a/addressbook/gui/widgets/e-addressbook-table-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c
@@ -28,6 +28,7 @@ static void
unlink_model(EAddressbookTableAdapter *adapter)
{
EAddressbookTableAdapterPrivate *priv = adapter->priv;
+ int i;
gtk_signal_disconnect(GTK_OBJECT (priv->model),
priv->create_card_id);
@@ -43,6 +44,14 @@ unlink_model(EAddressbookTableAdapter *adapter)
priv->modify_card_id = 0;
priv->model_changed_id = 0;
+ /* free up the existing mapping if there is one */
+ if (priv->simples) {
+ for (i = 0; i < priv->count; i ++)
+ gtk_object_unref (GTK_OBJECT (priv->simples[i]));
+ g_free (priv->simples);
+ priv->simples = NULL;
+ }
+
gtk_object_unref(GTK_OBJECT(priv->model));
priv->model = NULL;