[empathy] keep a ref on the account



commit 861b7dab7368472935d533a9bb0c65ad6c1e35c2
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Tue Jul 13 15:42:45 2010 +0200

    keep a ref on the account

 libempathy-gtk/empathy-log-window.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 7ea7bf1..35e554d 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -194,7 +194,7 @@ select_account_once_ready (EmpathyLogWindow *self,
 {
 	EmpathyAccountChooser *account_chooser = EMPATHY_ACCOUNT_CHOOSER (self->account_chooser_chats);
 
-	self->selected_account = account;
+	self->selected_account = g_object_ref (account);
 	self->selected_chat_id = g_strdup (chat_id);
 	self->selected_is_chatroom = is_chatroom;
 
@@ -334,6 +334,7 @@ log_window_destroy_cb (GtkWidget       *widget,
 {
 	g_free (window->last_find);
 	g_object_unref (window->log_manager);
+	tp_clear_object (&window->selected_account);
 	g_free (window->selected_chat_id);
 
 	g_free (window);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]