diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 03fe897..c9ed377 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -2026,13 +2026,37 @@ individual_view_set_view_features (EmpathyIndividualView *view,
 }
 
 static void
+empathy_individual_view_remove_store (EmpathyIndividualView *self)
+{
+  EmpathyIndividualViewPriv *priv;
+  priv = GET_PRIV (self);
+
+  /* Destroy the old filter and remove the old store */
+  if (priv->store != NULL)
+    {
+      g_signal_handlers_disconnect_by_func (priv->store,
+          individual_view_store_row_changed_cb, self);
+      g_signal_handlers_disconnect_by_func (priv->store,
+          individual_view_store_row_deleted_cb, self);
+
+      g_signal_handlers_disconnect_by_func (priv->filter,
+          individual_view_row_has_child_toggled_cb, self);
+
+      gtk_tree_view_set_model (GTK_TREE_VIEW (self), NULL);
+    }
+
+  tp_clear_object (&priv->filter);
+  tp_clear_object (&priv->store);
+}
+
+static void
 individual_view_dispose (GObject *object)
 {
   EmpathyIndividualView *view = EMPATHY_INDIVIDUAL_VIEW (object);
   EmpathyIndividualViewPriv *priv = GET_PRIV (view);
 
-  tp_clear_object (&priv->store);
-  tp_clear_object (&priv->filter);
+  empathy_individual_view_remove_store (view);
+
   tp_clear_object (&priv->tooltip_widget);
 
   empathy_individual_view_set_live_search (view, NULL);
@@ -2786,22 +2810,7 @@ empathy_individual_view_set_store (EmpathyIndividualView *self,
 
   priv = GET_PRIV (self);
 
-  /* Destroy the old filter and remove the old store */
-  if (priv->store != NULL)
-    {
-      g_signal_handlers_disconnect_by_func (priv->store,
-          individual_view_store_row_changed_cb, self);
-      g_signal_handlers_disconnect_by_func (priv->store,
-          individual_view_store_row_deleted_cb, self);
-
-      g_signal_handlers_disconnect_by_func (priv->filter,
-          individual_view_row_has_child_toggled_cb, self);
-
-      gtk_tree_view_set_model (GTK_TREE_VIEW (self), NULL);
-    }
-
-  tp_clear_object (&priv->filter);
-  tp_clear_object (&priv->store);
+  empathy_individual_view_remove_store (self);
 
   /* Set the new store */
   priv->store = store;
